M
magmike
I have three fields I would like to require:
[County] a text box
[PCompany] a combo box that gets its data from another table
[MList] a yes/no radio group
Using the information found in an old post
(I tried the following in the
form's properties under BeforeUpdate:
--------
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me.MyCompany) Then
Cancel = True
MsgBox "You forgot 'My Company'!"
End If
End Sub
--------
First problem is, that it doesn't seem to work. If I start a new record and
enter data, failing to make a selection from the PCompany combo box, it
doesn't alert me. Secondly, once I do get something to work, if I am using
this under the form's properties, instead of under the control's, how can I
modify it to apply to all three controls?
[County] a text box
[PCompany] a combo box that gets its data from another table
[MList] a yes/no radio group
Using the information found in an old post
(I tried the following in the
form's properties under BeforeUpdate:
--------
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me.MyCompany) Then
Cancel = True
MsgBox "You forgot 'My Company'!"
End If
End Sub
--------
First problem is, that it doesn't seem to work. If I start a new record and
enter data, failing to make a selection from the PCompany combo box, it
doesn't alert me. Secondly, once I do get something to work, if I am using
this under the form's properties, instead of under the control's, how can I
modify it to apply to all three controls?