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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lost Focus/Test control with focus???

Status
Not open for further replies.

RollingMoose

Programmer
May 13, 2002
73
US
We have a form with various text boxes, checkboxes, etc. When the user moves out of a textbox("Name"), we use the lost focus event to look for address information in a database. If none is there, we show a message that no information was found. We would like to suppress or not show our message if the user clicks on a specific checkbox. Any suggestions on how we can accomplish this?? Thanks in advance.
 
In the lost focus event you can check the state of the check box first.

Private sub Text1_LostFocus()
If Check1.value = 0 then
msgbox "????"
End if
End Sub Thanks and Good Luck!

zemp
 
Instead of using the LostFocus event, you might try using the Validate event, and then in the checkbox, set the .CausesValidation property to false Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top