VB MSGBOX Help required

joolsUK0575

Registered User.
Local time
Today, 15:47
Joined
May 6, 2004
Messages
49
Hi there

Need some quick help with VB. I have no idea how to write out the VB for what I require but I believe it may be quick and simple for someone in the know.

What I need is a MSGBox to appear if a specific field has not been filled in when a user tries to save a record.

When the box appears it just needs to have a message in the prompt box and the user can then click OK and enter the required text in the field.

Thanks for any help :D

Jools
 
In the form's BeforeUpdate event.

Code:
If Nz(Me.MyTextBox, vbNullString) = vbNullString Then
    MsgBox "Bla bla bla", vbExclamation, "Title"
    Cancel = True
End If
 
Excellent stuff. Worked a treat!

Thanks :)
 

Users who are viewing this thread

Back
Top Bottom