Can not apply filter on one or more fields specified on Filter pro

  • Thread starter Thread starter yanguo
  • Start date Start date
Y

yanguo

Hi, there,

I have a subform embedded in a main form. In my code I apply some filter to
the subform based on selections on main form.

When I do "Loc_No = xxxx" it works fine. When I put filter like "Loc_No IN
(Select LocID FROM Location WHERE City = xxx" it gives me error message
"Cannot apply filter on one or more fields specified on Filter property."

I don't know why. Anybody had same problem before?

Thanks!
 
Is the table in the sub form related to the table in the main form?
Do you have the Link Master Field(s) and Link Child Field(s) set the the
fields that relate the tables?
 
I didn't set those link fields because they don't directly link.

I just tried to use a recordset get the subquery values and feed them into
filter string so it is assigned as "Loc_No IN (9120, 9200, 9300, 9400)". It
works this way. I guess the form filter string just doesn't like subquery.

Thanks!
 
Back
Top