M
Morgan Gartland via AccessMonster.com
Hi I have a drop down list on a form the has two options Min or Max.
the table the form is based on is using a look up wizard for the minmax
field.
I want this field to be filled in before the user can move on. I donot want
to this at table level as the users will not understand the access message.
ideally i want to force the user to enter min or max and nothing else, i
have tried If IsNull that seemed to work at home on access 2003 but not at
work on access 2000.
Code i used at home:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me.Controls("MinOrMax").Value) Then
Cancel = True
MsgBox "Please enter Min Or Max for the MinOrMax Field", _
vbOKOnly + vbInformation
End If
End Sub
IF anyone could provide an answer i would be most grateful as i have only
been using VBA for about a month now.
Morgan
the table the form is based on is using a look up wizard for the minmax
field.
I want this field to be filled in before the user can move on. I donot want
to this at table level as the users will not understand the access message.
ideally i want to force the user to enter min or max and nothing else, i
have tried If IsNull that seemed to work at home on access 2003 but not at
work on access 2000.
Code i used at home:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me.Controls("MinOrMax").Value) Then
Cancel = True
MsgBox "Please enter Min Or Max for the MinOrMax Field", _
vbOKOnly + vbInformation
End If
End Sub
IF anyone could provide an answer i would be most grateful as i have only
been using VBA for about a month now.
Morgan