Message Boxes

RadioProject

New member
Local time
Today, 16:55
Joined
Dec 16, 1999
Messages
5
I am trying to write a debug script in a module so that a Null value is left in a text box. How do I go about executing a Message Box telling the user to enter something in before the rest of the code is executed?
 
Do your check on the BeforeUpdate of the Text Box Field. If the value is Null or empty :

if nz(Me.[TextField],"")="" then
msgbox "You must enter data"
Cancel = True
Exit sub
end if

Setting Cancel = True stops the leaving of the field, basically keeps them from Entering a null value. You can also run this from the Exit Event by Running it's BeforeUpdate Event.
 

Users who are viewing this thread

Back
Top Bottom