473,324 Members | 2,313 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Search for records based on category chosen in combo box

I have set up a combo box that has categories eg finance, legal etc. How do I get it to work, so that when a person chooses one of the values in the combo box, a table or form opens to show only the records that come under that category?
Sep 30 '10 #1
5 2528
beacon
579 512MB
You will add an AfterUpdate() event to the combo box in VBA that calls the form using the DoCmd.OpenForm method and sends a filter to the form.

Here's an example (although it updates a subform, the same theory applies, just do a search on the DoCmd.OpenForm and how to pass a filter and you'll be in good shape): http://www.techonthenet.com/access/f...ilter_form.php
Sep 30 '10 #2
Maybe it's the filter I am having problems with.

How do I specify a filter in the query to pull up records based on the combo selection?

PS I don't really want a subform, just the combo selection (which is in a switchboard) to open the table only with the filtered results.

I've trawled the web, and can't find this anywhere simply explained. I have tried writing =Forms![YourForm]![YourcOMBObOX]and other variants on this, in the query table, but then I just get a parameter box with this double dutch in the label.
Oct 1 '10 #3
Mr Key
132 100+
Open this attachment below, may be this is what you are looking for.
In this attachment you will just open a records based on Combobox.
Should you have any doubts, dont hesitate to ask
Attached Files
File Type: zip SearchforRecords.zip (26.4 KB, 262 views)
Oct 3 '10 #4
Mr Key
132 100+
If that post wont answer your question, try this new one, in this you can decide to open report or query
Attached Files
File Type: zip CombostoOpenQuery.zip (33.3 KB, 557 views)
Oct 3 '10 #5
Hey Mr Key, thank you for your post, it helps me somehow. However, ** Snip **.
Feb 27 '12 #6

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

Similar topics

1
by: Job Lot | last post by:
How can I filter/search records in DataGridView after filling it with data? The BindingNavigator provides default functionality for navigating, adding, deleting and saving records. Is there...
11
by: Matt | last post by:
Hi everyone, still pretty new to MySQL. I was wondering if there is a way to automatically filter records based on a mysql userlogin name?? I have serveral databases that I want to combine in...
1
by: arthur-e | last post by:
How can you select records based on more than one combo box - I have a combobox that selects records based on name (I'm sure this has been asked a thousand times - web site answer/link could be...
4
by: MLH | last post by:
I have a combo box control on a form and a text box beside it in which I would like to display the number of listings in the combo-box. The combo box lists more or fewer rows depending on the...
5
by: Col | last post by:
I have a query with criteria that comes from a combo box on a form. I'd like to set the query up so the user can either limit the criteria to the selection in the combo box or the user can pull all...
3
by: panwala_bhavesh | last post by:
I have a form (View All Assets) with two combo boxes (ComboManufacturer & ComboProductType) and a subform with a dataview that displays the results of my query below: SELECT Assets., Assets....
6
by: Kazza | last post by:
Hi I'm using Access 2003 and I need to figure out how to display the record details based on a combo box selection. For example, when I select a company name in a combo box, how do I get the related...
4
by: banderson | last post by:
Hello amazing vba writers, I am trying to make a combo box return a value based on a combo box selection. I have tried a number of the codes posted here and am still having problems. I think it is...
2
by: macnimation | last post by:
Hi, I have created a Search Input that when a word is typed, I get a result of records based on all or part of the word, which is fine, and this is based across several Fields. Any Table fields...
6
by: BEETHOVEN | last post by:
I have an option group called Issue_Type on my main form F1_Member_Demographics_Main. When I select one of the 3 options on the main form from the option group Issue_Type I want to limit the sub...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.