Warning Box

M

Mike

Help please - is it possible to give a warning on an unbound input form if a
required field is left blank in Access 2000

Thanks for any help
 
R

Rick Brandt

Mike said:
Help please - is it possible to give a warning on an unbound input
form if a required field is left blank in Access 2000

Thanks for any help

If IsNull(Me.ControlName) Then MsgBox("HEY!")
 
O

Ofer

On the unload event of the form, you can write the code

If Me.[Text Box Name] = "" Or IsNull(Me.[Text Box Name] ) Then
msgbox "Null Null"
cancel = true ' Wont let the user close the form
Me.[Text Box Name].SetFocus ' return the focus to the field
End If
 
Top