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

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!
 
K

Klatuu

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?
 
Y

yanguo

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!
 

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