
Filter in Subforms via Module-Function
I copied the Phone-filter from the northwind-MDB in my mdb. But I want
to apply the filter in a subform
With CodeContextObject
If (.SecondNameFilters = 1) Then
' Filter for company names that start with A, , , ?, ?,
or ?.
DoCmd.ApplyFilter "",
"Forms![AddressList]![AddressListSubform].Form![Name] Like
""[A???]*"""
End If
If (.SecondNameFilters = 2) Then
' B
DoCmd.ApplyFilter "", "[Name] Like ""B*"""
the first example shows the NOT WORKING subform-syntax,
the 2nd shows the working syntax if the field [name] was in the same
form as the filter-button. I transformed it into a subform but i still
want to be able to filter it. Unfortunately it doesn't work.
can someone tell me the correct way to write the subform into that
filter-command?
thanx
oliver