Use Me in a subform

enfinity

Registered User.
Local time
Today, 17:25
Joined
May 31, 2007
Messages
35
I have a subform that is connected to the main form through the field INVOICE_ID. Now, I want to filter a combo box in the subform based on the current INVOICE_ID. For this reason I have included the following line in the WHERE clause: [Me]![INVOICE_ID].

I thought this works but evertime I want to select a record from the combo box in the subform, Access prompts me to input the number... apparently it does not recognize the field.
 
If your Invoice_ID is on the parent form, you have to use the child linked field or refer to the main form using Me.Parent.Invoice_ID
 
check out this link, how to properly reference it.
 
The INVOICE_ID is on the child form. DBWIKI has a good despribtion of how to deal with forms/subform control elements. However, I cannot get it to work. The combo box is on a subform thus I would simply use Me.CONTROL_NAME.

Also, when I try to use the INVOICE_ID on the parent form with Me.Parent.Invoice_ID, this also does not work.

Any ideas why?

Thanks!
 
Thanks maxmangion!

According to this link, I should be able to use Me!ControlName. However, it does not recognize the field.
 
You do have to have Invoice_ID as a (hidden) CONTROL on your form.... not just in your recordset and/or linked .... you co need the control !
 

Users who are viewing this thread

Back
Top Bottom