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

Filter a form via a set of comboboxes on a seperate search form

P: 73
Hi all,

This one is way to complex for me to work out.
Presently I have a search form (frm_Search) which is accessible via the Switchboard. I want to be able to search for records within frm_Argument.

I've created a many-to-many relationship between tbl_Argument and fields; fld_Structure, fld_System, fld_Component, fld_Substance which are based on their respected tables. I adjust how the fields and arguments from frm_Argument are linked via a junction table/form.

I want to be able to search using the fields above on frm_Search using comboboxes to filter frm_Argument to the records which are joint to each particular field.

The problem is that the fields can only be shown within a sub-form on frm_Argument because they are not within tbl_Argument (unless I can create a bound lookup somehow?). It means that it will be difficult to filter the form from a seperate form unless you can link to the subform?

Once that has been worked out I'd also like to be able to select the 4 fields (based on seperate comboboxes) on frm_Search to filter the records down as much as possible rather than just using one combobox. Also on frm_Search I'd want to use a command button once the combobox items have been selected to open frm_Argument with the filtered results.

I have no idea where to start.

Thank you for any assistance and I'm sorry if this isn't obvious enough,

Aug 15 '12 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 5K+
P: 5,397
That's hard to see what you have going on in my mind's eye...

However, start with this: I think that you can do this without too much trouble; however, we may need to take a peek under the hood in a post or two :)

(you'll also want to take a look at the links at the bottom of that link as it will answer part two of your question)
Aug 15 '12 #2

P: 73
I forgot about that link! I'll give it a good read tomorrow.

Cheers Z
Aug 15 '12 #3

P: 73
OK the examples by NeoPa will not work in my case as the search form is working seperately to the main form.

It is also gathering data from a subform to filter the main form which NeoPa's method doesn't address.

I followed Allen Browne's method for filtering the main form based on a field in a subform:

This works perfectly on the main form. I now want to move that method to the search form somehow rather than clogging up the main form with searches.

I've managed to recreate the same method on the search form by binding the search form to tbk_Argument (the same table the main form is bound to) and putting in a hidden copy of the subform. However I'm not sure how to open up the main form with the same filter?

When I open the main form using a command button, once the filter is set in the search form, it will open up all records with no filter or if I set the WHERE criteria to the ID field it will open up just one record not the entire filtered list.

I've seen that there are methods of opening reports using the same filter as the calling form I'm wondering if it's possible with other forms.

Feels like I'm close but still far...
Aug 16 '12 #4

Post your reply

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