siCIVIC1986
Registered User.
- Local time
- Today, 02:23
- Joined
- Feb 22, 2010
- Messages
- 12
Hi all
I have another problem which I was hoping another set of eyes could possibly help me out with!
I have attached a screen shot of my form and the following code is linked to the on click event on the cmdOK button:
What im trying to achieve is when the user clicks on the ok button I want them to have made sure a value is entered into the textbox otherwise prompt for them to do so or then can click the cancel button.
At the moment when the user clicks the ok button the form closes regardless if there is anything in the text box.
could any body shed some light into what i may be doing wrong please?
Thanks in advance.
Simon Knott
I have another problem which I was hoping another set of eyes could possibly help me out with!
I have attached a screen shot of my form and the following code is linked to the on click event on the cmdOK button:
Code:
Private Sub cmdOK_Click()
If tbEnter.Value = Null Then
MsgBox "Please enter reason why Inactive."
Else: DoCmd.Close
End If
End Sub
What im trying to achieve is when the user clicks on the ok button I want them to have made sure a value is entered into the textbox otherwise prompt for them to do so or then can click the cancel button.
At the moment when the user clicks the ok button the form closes regardless if there is anything in the text box.
could any body shed some light into what i may be doing wrong please?
Thanks in advance.
Simon Knott