Losing focus on a text box

DaveMere

Registered User.
Local time
Today, 19:45
Joined
Sep 18, 2002
Messages
63
I'm working on a form which has two text boxes, the data in which must be checked against a list to see if their entry is permitted. I've set up a procedure called by the LostFocus events of both text boxes that runs a query based on the information in the text boxes, checking against this list.
The problem is that to capture the data from the text boxes I must SetFocus to them . . . and including this command in a procedure called by the LostFocus event means at runtime you can never leave this textbox!
Is the intended location included as a property of the LostFocus event? Or does anyone have any other solutions?

Thanks.
 
I guess you use Value property. Just leave the property out and you'll be able to use On Lost Focus event.

If Me.YourTextBoxName1 <> ... Or Me.YourTextBoxName2 <> ... Then
...
End If
 
If by that you mean to limit the permissible values in the field, I'm afraid not; I must leave the field open for new data. The list of unacceptable data is relatively small, so I thought to filter against this.

Dave
 

Users who are viewing this thread

Back
Top Bottom