Filter a control on a subform?

  • Thread starter Thread starter Gary Hull
  • Start date Start date
G

Gary Hull

Hello All

I am trying to filter a form from a control on a subform

I am trying to use the same process that is in Allen Browne
([email protected]), June 2006. Search2000.mdb

Here is the code I am using

'Number field example. Do not add the extra quotes.
If Not IsNull(Me.Combo6) Then
strWhere = strWhere & "([pkProduct] = " & Me.Combo6 &
") AND "
End If

If Not IsNull(Me.Combo8) Then
strWhere = strWhere & "(Me.!frmSlupplier.Form.!
cboSlupplier = " & Me.Combo8 & ")
End If

The first (Where) statement filters the main form to the
selected Product
The second (Where) statement filters the subform to select
the supplier


Thanks

Gary Hull
 
You've got an extra periods between Me and ! and between Form and ! in

If Not IsNull(Me.Combo8) Then
strWhere = strWhere & "(Me.!frmSlupplier.Form.!cboSlupplier = " &
Me.Combo8 & ")
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top