Query criteria from form combobox

ITguy1981

Registered User.
Local time
Today, 01:59
Joined
Aug 24, 2011
Messages
137
I can't figure out how to get my query to run from criteria based on a combobox from another table. I have a field "prac" that has entries such as JF, MG, PM, RJ etc. My query has the criteria for prac as [Forms]![PracReportPrint]![PracChoice]. PracChoice is the name of the combobox. if I specifiy a valuelist for the combobox the query works. I created a different table just for a list of practitioners that contains only an index key and practitioners (JF, MG, PM, RJ, and so forth). When I set the combobox to table/query and select practitioners from my other table I get the correct list,b ut the query doesn't seem to detect what is selected from the combobox.
 
The Bound Column property of the combo is probably the key field while your query is expecting the Practitioner name. This is the column that the Value property comes from.

Change the BoundColumn to the initials and your query will probably work.

You probably should change the key of the Prac table to the practitioner initials since this is what you appear to have used in the other tables.
 
I'm not having much luck changing the bound column. The table that the combobox is getting data from only had two fields. I've tried changing the bound column and it seems like it's always using the number of the index field instead of the second field practitioners. For now I just used a created list within the properties and specified the practitioners instead of looking to the second table.
 

Users who are viewing this thread

Back
Top Bottom