AnOddExperiment
Registered User.
- Local time
- Today, 14:03
- Joined
- Dec 10, 2007
- Messages
- 20
Hi everyone, still a newbie coder, but I was wondering if you could look at this and tell me why it returns an error:
I'm trying to write a bit of code that will not allow the user to move to the next part of the form without first completing the entire form. The part I'm having trouble with defining what null, nothing, and an empty string means in terms of VBA. Thanks so much!
Code:
Dim ctl As Control
Dim bolComplete As Boolean
bolComplete = True
For Each ctl In Controls
If TypeOf ctl Is TextBox Or TypeOf ctl Is ComboBox Then
If ctl.Value = "" or ctl.Value is Null or ctl.Value is Nothing Then
bolComplete = False
End If
End If
Next
I'm trying to write a bit of code that will not allow the user to move to the next part of the form without first completing the entire form. The part I'm having trouble with defining what null, nothing, and an empty string means in terms of VBA. Thanks so much!