Subform Filter

D

Darkside

How do I filter a subform on filtered data. Example: currently I filter the
subform based on the data column,which works. However, what I really want is
to find all of the data #'s with the same info #.

Would someone please help me with this issue?

Data Info
12 8989
23 020
34 8989
45 234
23 8989

Filtered:
Data Info
12 8989
34 8989
23 8989


Here is the code I use to find the Data # only.
ElseIf cboFilter = "NCC" Then
strWhere = strWhere & "([STOCK #] Like """ & txtFilterMain & """) AND "
End If
lngLen = Len(strWhere) - 5
If lngLen <= 0 Then
MsgBox "No criteria", vbInformation, "Nothing to do."
Else strWhere = Left$(strWhere, lngLen)
Me![tbl_ERX SubForm].Form.Filter = strWhere
Me![tbl_ERX SubForm].Form.FilterOn = True

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

Top