Hi all,
I'm having a tough time validating frames and checkboxes in VB. Lets say I have a frame, and I want one value in the frame ( Option Boxes ) checked. Basically, I don't want the frame to have a zero value. How do I do this? The code I'm using now is:
Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo ErrHandler
If IsNull(Me.Frame22.Value And Me.Frame193.Value And Me.Frame45.Value And Me.Frame93.Value And Me.Frame206.Value And Me.Frame131.Value And Me.Frame146.Value) Then
MsgBox "Please make sure all data has been entered"
Cancel = True
End If
ExitHere:
Exit Sub
ErrHandler:
Debug.Print Err; Err.Description
Resume ExitHere
Where am I going wrong? It's not validating! As for the checkboxes, I have one option's button, when clicked, 3 checkboxes appear, and one of them have to be checked. How do I do this?
Thanks in advance
Uttam
I'm having a tough time validating frames and checkboxes in VB. Lets say I have a frame, and I want one value in the frame ( Option Boxes ) checked. Basically, I don't want the frame to have a zero value. How do I do this? The code I'm using now is:
Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo ErrHandler
If IsNull(Me.Frame22.Value And Me.Frame193.Value And Me.Frame45.Value And Me.Frame93.Value And Me.Frame206.Value And Me.Frame131.Value And Me.Frame146.Value) Then
MsgBox "Please make sure all data has been entered"
Cancel = True
End If
ExitHere:
Exit Sub
ErrHandler:
Debug.Print Err; Err.Description
Resume ExitHere
Where am I going wrong? It's not validating! As for the checkboxes, I have one option's button, when clicked, 3 checkboxes appear, and one of them have to be checked. How do I do this?
Thanks in advance
Uttam