find numerous accounts (and skip through results)

blower16

Green as Grass
Local time
Today, 09:32
Joined
Jan 27, 2005
Messages
9
Put simply - when I do a find it displays the first account that matches it, then, when you leave the find screen and hit the "next record" key it simply displays the next account (i.e it no longer matches the search criteria).

So my question is,
How do I search records, then skip through ALL accounts that match the criteria.

example:
100 accounts in a database. 50 accounts are assigned "Mr A" and 50 "Mr B".
Mr A and Mr B sit down to work - hit find, and type in their name.
The form shows 1 account, and when mr A hits next fifty times it should not move on to mr Bs (possibly a "no more matches/records" message?).

I hope this is clear enough - and thanks in advance.

ps - I heard something about one form to search - and a subform to display results - the search criteria is static in form one, where as the subform can be skipped ("next record" pressed). But trust me - Im inexperianced :p and would need a nice newbie friendly description of such technological witchcraft.
 
The best thing to do is to have your main form used for the search fields running off a query as its datasource, then you make a copy of that query and use it as the datasource for the results form. The main form will host the search fields and subform, the subform will need to have its query modified so that you set the criteria in the fields you want to search by so that the query only brings up records matching the value in your search box. Then you set the AfterUpdate event on the search box and enter docmd.runcommand.accmdrefresh to force the recordset to update after the value in the search box changes. If you do it correctly you will only see records for Mr. A if that is what you searched for. I suggest you set the subform to be viewed in Datasheet mode and give them a button that open a form with the selected record. If you will like to see a working database, let me know and I will send you one.
 

Users who are viewing this thread

Back
Top Bottom