I'm new to access 2007 forms and I'm sure this is an easy question:
I want to make a selection in one combo box and have the other show the matching info (program => program_cost). The bound boxes are on a subform for an invoice table. The program-price combinations are on a seperate lookup table Thec_Program.
This code on the program_cost box works when only the subform is open :
SELECT THEC_Program.Program_Cost,THEC_Program.Program,THE C_Program.ID
FROM THEC_Program
WHERE (((THEC_Program.ID)=[Forms]![SUBFORMNAME]![Program]));
When the full form is open, the subform is a tab and the above code returns a parameter error it doesnt recognize the subformname.
So I chage to this:
SELECT THEC_Program.Program_Cost, THEC_Program.ID, THEC_Program.Program
FROM THEC_Program
WHERE (((THEC_Program.ID)=[Forms]![FORMNAME]![Program]));
No parameter error but the drop down is blank.... Why is query coming back blank?
I have an AFTERUPDATE on the program box. On the subform this allows for multiple changes.
Private Sub Program_AfterUpdate()
Me.Program_Cost = Null
Me.Program_Cost.Requery
Me.Program_Cost = Me.Program_Cost.ItemData(0)
Thanks for any help.