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

How do I Filter in a Form Rather than Search for One Record

P: 5
I have a table with 18 columns. The client wants to search on all the 18 columns with any sort of combination ranging from 1 col search to all 18 columns. I have written a query using the OR condition that would search all the 18 columns and its working fine. The coding is done using recordset and the values are returned back to the form.

The problem is when I have more than 2 records satisfying the same condition when I want to return the values back to form It only displays the values for the first record. I was wondering if there is any way to show all the records that matches user criteria (multiple items) is the solution or like datasheet?(using expression builder)

I have also used the expression builder n the query returns records in datasheet but I want to check if that could be done using forms.

Please help.
Jan 13 '12 #1

✓ answered by Rabbit

Use a continuous form.

Share this Question
Share on Google+
6 Replies

Expert Mod 10K+
P: 12,366
Use a continuous form.
Jan 13 '12 #2

P: 5
Thank you for your reply. I am able to get it work but there is another problem. I am doing something wrong for sure.

I have 2 forms. Form 1 and Form 2. Form 1 takes all the parameters from the user and when user click on the search button it goes to vb code where it does all the data work. The query runs fine.

On Form 2 i changed the property to continous form and placed two textboxes to show first two columns. I created a query and used that query as the record source.

The problem is I have to open the Form 2 manually to see the result. I am looking is there any way I can take the values in the same form and show the data back to the user within that same form. If no than what code do I need to modify to get data from one form and show it to another form without manually opening the Form 2.

Jan 13 '12 #3

P: 5
GOt it. I used the Docmd.openform code and then specify the conditions thanks.
Jan 13 '12 #4

Expert Mod 10K+
P: 12,366
You could put form 2 in form 1 as a subform and then requery it when the user clicks the search button. Or if you want to keep them separate, you can just open the form when they click the search button.
Jan 13 '12 #5

Expert Mod 15k+
P: 31,492
Indeed. If you form a string which specifies all the conditions as if it were in a SQL WHERE clause, then this may be passed as the WhereCondition parameter to your DoCmd.OpenForm call.
Jan 13 '12 #6

P: 5
Thanks guys for your help.
Jan 13 '12 #7

Post your reply

Sign in to post your reply or Sign up for a free account.