R
Richard Rueda via AccessMonster.com
Hi there
I am currently working on a database project which involves some custom
message boxes. What I am trying to do is check to see whether a field is
null when the save record, next, previous or exit button is clicked.
I believe the general formula is somthing like this
If Forms![Form Name]![Field Name] is Null then Msgbox("Please enter a name
into this field") else continue with the normal code
It compiles ok but when I go to run it a message box appears saying "Object
Required" but not what I want it to do which is for a message box to appear
saying that you must enter something into the field.
I have chosen to put the code on the click of the buttons so that when they
are clicked they cannot carry out their normal function until the field is
filled it therefore not allowing an empty field to be stored into the
database.
I thank you very much in advanced any help is greatly appreciated
Richard
I am currently working on a database project which involves some custom
message boxes. What I am trying to do is check to see whether a field is
null when the save record, next, previous or exit button is clicked.
I believe the general formula is somthing like this
If Forms![Form Name]![Field Name] is Null then Msgbox("Please enter a name
into this field") else continue with the normal code
It compiles ok but when I go to run it a message box appears saying "Object
Required" but not what I want it to do which is for a message box to appear
saying that you must enter something into the field.
I have chosen to put the code on the click of the buttons so that when they
are clicked they cannot carry out their normal function until the field is
filled it therefore not allowing an empty field to be stored into the
database.
I thank you very much in advanced any help is greatly appreciated
Richard