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

Form Problem........PLEASE HELP !!!!!

Status
Not open for further replies.
Jul 17, 2001
19
US
Im trying to setup a form that has a blank text box with a search button next to it. I want to be able to type a search string into the text box, and then be able to click on the search button and have it search a table. If ANYONE knows what I need to do, PLEASE let me know.
 
Mark,

You were not clear if you wanted it to search the entire table or not. If so, i'm not sure how to do that. However, if you wish to search the records of one particular field in your table, set the text box's control source to that field in the table and then you can create a command button w/the wizard that will do all the work for you.

Even so, here is the code:
Code:
Screen.PreviousControl.SetFocus
    DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

this will search from the last text box on your form that had the focus.
HTH ~Rob

If we expect the unexpected, does that make the unexpected... well, expected?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top