MsgBox Based on Text Box Value - More Help Needed

diensatthan

Registered User.
Local time
Today, 14:43
Joined
Apr 27, 2003
Messages
14
I need to know how to display a message whenever the value of a bounded Text Box (Enabled = No) on a form is ZERO when navigating. Thanks.

Mile-O-Phile suggested the following code:
------------------------------------------------------
Private Sub Form_Current()

If Me.txtYourTextbox = 0 Then
MsgBox "Hey, it's a 0 value!", vbInformation, "0 Found"
End If

End Sub
--------------------------------------------------------

This solution almost works except when the First record is applicable; MsgBox is displayed PRIOR to the form is opened.
 
Try putting that code on the "On Exit" event of each textbox if you want the message to pop up during the navigation.
 

Users who are viewing this thread

Back
Top Bottom