Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Required text code in form's Before Update NOT WORKING

Status
Not open for further replies.
Aug 4, 2004
84
0
0
US
Hello I have the following code in my forms before update in order to check if there is text in the field:

If IsNull(Confirmed) Then
MsgBox "Data is required."
Confirmed.SetFocus
Cancel = True
End If

However, when I exit my form via the close form button, a message says:

"data entry required" which is great, I click ok to enter text but the form closes???

The confirmed field is a required field in the table properties, However, a message box only comes up when you physically click on the field and TAB out of it. If you click on the Field and click out the message does not come up and you can close the form...

any Suggestions???



 
why don't you put it in the On Close event of the form?

Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top