By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,478 Members | 1,709 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,478 IT Pros & Developers. It's quick & easy.

Search Button

P: n/a
I'm trying to set up a search button on a form. I went thru the
FindRecord macro wizards and it's not working correctly or maybe it is
and I just don't understand all the arguements I have to enter in. The
table to search for is Shops and the Field I want it to search for Shop
Name. I want to be able to click on the button, enter in the Shop
Name, and have it find that record on the current opened form.

Mar 7 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Assuming your form is bound to the Shops table, and there is a text box
named Shop Name, put these 3 lines into the Event Procedure for your
button's Click event:

If Me.Dirty Then RunCommand acCmdSaveRecord
Me.[Shop Name].SetFocus
RunCommand acCmdFind

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
<fo*******@martecgroup.com> wrote in message
news:11*********************@i39g2000cwa.googlegro ups.com...
I'm trying to set up a search button on a form. I went thru the
FindRecord macro wizards and it's not working correctly or maybe it is
and I just don't understand all the arguements I have to enter in. The
table to search for is Shops and the Field I want it to search for Shop
Name. I want to be able to click on the button, enter in the Shop
Name, and have it find that record on the current opened form.

Mar 8 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.