O
OsmoseTom
Can someone please help me?
I created a form called Communicaiton Needs Survey. The form is linked to a
SQL server table called Communication Survey. We are using a SQL table so
that multiple users can enter data simultaneously.
I would like to require data in a field (CurrentCellPhoneProvider) if a
check box (CurrentCellPhone) is checked.
Here is the code I am using:
Private Sub Current_Cell_Phone_Provider_BeforeUpdate(Cancel As Integer)
If Me.CurrentCellPhone = True Then
If IsNull(Me.CurrentCellPhoneProvider) Then 'No entry was made
MsgBox "If Cell Phone box is checked you must enter the cell phone
provider.", vbInformation, _
"Missing Current Cell Phone Provider..."
Cancel = True
Me.CurrentCellPhoneProvider.SetFocus
End If
End If
End Sub
The issue I am having is that when the CurrentCellPhone checkbox is checked
I can tab past the CurrentCellPhoneProvider field without the msg box
appearing?
I created a form called Communicaiton Needs Survey. The form is linked to a
SQL server table called Communication Survey. We are using a SQL table so
that multiple users can enter data simultaneously.
I would like to require data in a field (CurrentCellPhoneProvider) if a
check box (CurrentCellPhone) is checked.
Here is the code I am using:
Private Sub Current_Cell_Phone_Provider_BeforeUpdate(Cancel As Integer)
If Me.CurrentCellPhone = True Then
If IsNull(Me.CurrentCellPhoneProvider) Then 'No entry was made
MsgBox "If Cell Phone box is checked you must enter the cell phone
provider.", vbInformation, _
"Missing Current Cell Phone Provider..."
Cancel = True
Me.CurrentCellPhoneProvider.SetFocus
End If
End If
End Sub
The issue I am having is that when the CurrentCellPhone checkbox is checked
I can tab past the CurrentCellPhoneProvider field without the msg box
appearing?