Looping thru all fields in subform for null fields
กระทู้เก่าบอร์ด อ.สุภาพ ไชยา

 218   1
URL.หัวข้อ / URL
Looping thru all fields in subform for null fields

ถามไว้ที่ http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=48117

เขาต้องการวนหาว่ามีฟีลด์ไหนใน Subform ที่ยังไม่ได้กรอกบ้าง

ลองทำแบบนี้ครับ

Private Sub Command1_Click()
Dim ctl As Control
For Each ctl In Me..Form.Controls
If ctl.ControlType = acTextBox Or ctl.ControlType = acComboBox Then
If IsNull(ctl) Then
MsgBox "No null allowed"
Me..SetFocus
ctl.SetFocus
Exit Sub
End If
End If
Next ctl
End Sub

1 Reply in this Topic. Dispaly 1 pages and you are on page number 1

1 @R06752
   
@ ประกาศใช้งานเว็บบอร์ดใหม่ => บอร์ดเรียนรู้ Access สำหรับคนไทย
แล้วจะใส่ลิ้งอ้างอิงมาที่โพสต์เก่านี้หรือไม่ก็ตามสะดวกครับ
Time: 0.0518s