two combo boxes to populate a list box

RhysPhelps

New member
Local time
Today, 21:35
Joined
Oct 30, 2009
Messages
1
hi guys and girls,
i have a form ("Form1") that has two combo boxes ("Cost" and "Account") that i would like to use to populate the list box ("Ref"). The table is "BudgetRef" I have the query currently set at:-

SELECT BudgetRef.Budget_Reference, BudgetRef.Account_Name, BudgetRef.Cost_Center
FROM BudgetRef
WHERE BudgetRef.Cost_Center=Forms!Form1!Cost

so that the "Cost" combo correctly populates the "Ref" list box. how would i go about adding the 2nd combo ("account") to the query? i've Tried to add AND in the WHERE but it returns a blank list box.

Oh and i've added the .requery on the combo changes so i dont think t is that.

Any help would be great

Thanks
 
hi guys and girls,
i have a form ("Form1") that has two combo boxes ("Cost" and "Account") that i would like to use to populate the list box ("Ref"). The table is "BudgetRef" I have the query currently set at:-

SELECT BudgetRef.Budget_Reference, BudgetRef.Account_Name, BudgetRef.Cost_Center
FROM BudgetRef
WHERE BudgetRef.Cost_Center=Forms!Form1!Cost
AND BudgetRef.Account_Name = Forms!Form1!Account

so that the "Cost" combo correctly populates the "Ref" list box. how would i go about adding the 2nd combo ("account") to the query? i've Tried to add AND in the WHERE but it returns a blank list box.

Oh and i've added the .requery on the combo changes so i dont think t is that.

Any help would be great

Thanks

I am assuming that you are using the Query Builder Grid to add the criteria. Also, what happens when you run the query through the Query Builder Grid with known values?
 

Users who are viewing this thread

Back
Top Bottom