943,865 Members | Top Members by Rank

Ad:
Feb 1st, 2009
0

Multi-Field User Defined Access Search via Queries

Expand Post »
If anyone can point me in the right direction I would greatly appreciate it.

I am making an Asset Management database. I'm looking at having about 50 fields in a table. Of those 50, 25 could potentially be used for searching. In some cases multiple fields would be used to narrow the scope of a search.

I have created a query for each of those 25 fields and set it to group by so I have a list of unique values for those fields. I then made a form with combo boxes based off those queries. My thinking is now on 1 form I have 25 combo boxes and a user can select what they want to sort by, by choosing it from the combo boxes.

I made another query that references all of those combo boxes as criteria for the fields.

This of course doesnt work and I can't figure out a way to ignore fields the user does not use to filter the data. The query always comes up empty. Is there a way to ignore unused fields? I set a default value for each of the combo boxes as "Choose Filter" but I can't figure out how to have Access ignore the values listed as "Choose Filter" while filtering based off the used fields.

I have tried to look up stuff about cascading combo boxes, but I do not think that will work for me because the user might use different fields each time they do a search.

I do not use SQL so if that is the solution I might need more help.

Thank you.
Reputation Points: 35
Solved Threads: 21
Junior Poster
HI2Japan is offline Offline
195 posts
since Mar 2006
Feb 2nd, 2009
0

Re: Multi-Field User Defined Access Search via Queries

Found a solution that works. I should have figured it would be easy.
IIf(IsNull([forms]![frmFilter]![DeptCombo]),[Department],[forms]![frmFilter]![DeptCombo])

I put this as a criteria for each of the fields in the main query substituting the combo box field.
Reputation Points: 35
Solved Threads: 21
Junior Poster
HI2Japan is offline Offline
195 posts
since Mar 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MS Access and FileMaker Pro Forum Timeline: Button Automation
Next Thread in MS Access and FileMaker Pro Forum Timeline: Help with comma separated values in report





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC