D
D.Bennett
What I need to do is once the client clicks the OK button is to cycle
through 5 text boxes, 2 Frames with option buttons and ensure the all
mandatory fields are filled in on the form. As a start I've been
trying to use the tag property to identify the fields to cycle
through...no problem there. However, what I need to do is check if the
field is null or not. I've tried checking the value and text
propertie, but they're not available using the controls. He's a snip
of the code I've been working with.
Thanks in advance for any help.
Dim ctl As Control
For Each ctl In Me.Controls
Select Case ctl.Tag
Case 1 'controls with a Tag of 1
ctl.SetFocus
If IsNull(ctl.Text) Then <----doesn't work
MsgBox ctl.StatusBarText & " is a Required field."
Else
End If
End Select
Next ctl
through 5 text boxes, 2 Frames with option buttons and ensure the all
mandatory fields are filled in on the form. As a start I've been
trying to use the tag property to identify the fields to cycle
through...no problem there. However, what I need to do is check if the
field is null or not. I've tried checking the value and text
propertie, but they're not available using the controls. He's a snip
of the code I've been working with.
Thanks in advance for any help.
Dim ctl As Control
For Each ctl In Me.Controls
Select Case ctl.Tag
Case 1 'controls with a Tag of 1
ctl.SetFocus
If IsNull(ctl.Text) Then <----doesn't work
MsgBox ctl.StatusBarText & " is a Required field."
Else
End If
End Select
Next ctl