Tupacmoche
Registered User.
- Local time
- Today, 19:02
- Joined
- Apr 28, 2008
- Messages
- 291
VBA Masters,
I have this simple for loop that gives me an error but, I can't see what's wrong any help is appreciated. Error msg is: Next without for
I have this simple for loop that gives me an error but, I can't see what's wrong any help is appreciated. Error msg is: Next without for
Code:
For Each ctl In Me.Detail.Controls
With ctl
If .ControlsType = acTextBox Then
If IsNull(.Value) Then
If .Tag = "v" Then
If MsgBox(ctl.Name & " is empty, this is a required field", vbOKCancel) = vbCancel Then
Cancel = True: ctl.SetFocus: Exit Sub
End If
End If
End If
Next ctl
Last edited by a moderator: