Filter a combobox in a subform with another combobox from main form

jjake

Registered User.
Local time
Today, 14:45
Joined
Oct 8, 2015
Messages
291
Hi,

I have a combo box on a subform that i would like to filter the results from the choice made on the main form.

I have done this successfully with 2 combo boxes on a main form using the query [Forms]![frmOrder]![PurchaseType].

But the subform doesn't seem to work the same. My subform name is [frmOrderline]

Thanks.
 
the filter action would take place in the sub form and affect that query. (not the master form)
in sub form:
Code:
sub cboFltr_AFterupdate()
  me.filter = "[field]=" & cboFltr
  me.filterOn = true
 
I tried this but maybe I am doing something wrong.

I am trying to filter combo box [CostCenter] on [frmorderline] with the selection made in combo box [Purchasetype] on [frmorder]

I put this into [frmorderline]

Code:
Sub CostCenter_AFterupdate()
  Me.Filter = "[PurchaseType]=" & CostCenter
  Me.FilterOn = True
End Sub
 
Any other input on this or can someone see what I am doing wrong above?

Thanks!
 

Users who are viewing this thread

Back
Top Bottom