0
votes

I'm trying to put together a form in Access where the user can enter multiple values to query against data. I can put together the query, the form which has a text box that allows new values on each line, and run the form with a button click. The problem is the query only takes the 1st line as the parameter and returns the results for that one.

Is there any way to do this in Access? I don't mind using VBA but it's been a while.

Any help or hints would be appreciated.

1

1 Answers

0
votes

From my understanding of your question you want multiple results returned on a single form. I don't know if any other way to do this then to use vba. One this you could do is put a button on your form (or use the arrow at the bottom) to browse to the next record. If you're looking to have a box pop up and the user enters the information you grab that record, you go to your query and under that field put

Like & [Type the information you want or press ENTER for all records] &

Which will pop up a prompt for the user to enter the information. I use this with my database when I'm searching for people I have in it. So when I search for last name and first name, in the query under fields lastname and first name I put

Like & [Enter last name or press enter for all records] &

Under first name I put the same thing but change it to first name. Then if I have multiple people like Smith, David I use a button to go to the next record.

Hope that's a step in the right direction.