Endeavouring
Board Regular
- Joined
- Jun 30, 2010
- Messages
- 115
Hi
I'm Trying to put some error checking in place on a form but feel there must be a better way of writing the following. Can anyone advise.
Thank you
Dim check As Integer
check = 0
If Ref.Value = "" Then check = check + 1
If Ref.Value = "" Then MsgBox "No Gender Selected"
If TextBox3.Value = "" Then check = check + 1
If TextBox3 = "" Then MsgBox "No Course Entered"
If TextBox4.Value = "" Then check = check + 1
if TextBox4 = "" Then MsgBox "No age Entered"
If check > 0 Then GoTo error
I'm Trying to put some error checking in place on a form but feel there must be a better way of writing the following. Can anyone advise.
Thank you
Dim check As Integer
check = 0
If Ref.Value = "" Then check = check + 1
If Ref.Value = "" Then MsgBox "No Gender Selected"
If TextBox3.Value = "" Then check = check + 1
If TextBox3 = "" Then MsgBox "No Course Entered"
If TextBox4.Value = "" Then check = check + 1
if TextBox4 = "" Then MsgBox "No age Entered"
If check > 0 Then GoTo error