Clearing a field

  • Thread starter Thread starter PJ
  • Start date Start date
P

PJ

I have a command button to clear a search a (Check box) but sometimes users
forget to clear the search. When other users use that form the check boxes
are not cleared. How do I code the form so when they exit the check box
clears.

Thank You In Advance!!
 
Other users?

There should be no other users. NEVER share the forms in an Access database.
You need to split the database into a back-end that contains all the tables
and a front-end that contains everything else. Link the tables in the
back-end to the front-end, and put a copy of the front-end on each user's
workstation. Failure to work that way in a multi-user environment will
eventually result in a corrupted database.

Text can be cleared using the Enter event on the textbox:

Private Sub txtSearch_Enter()
Me.txtSearch = ""
End Sub
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley
 
Back
Top