Subform filter

G

Gurtz

Hi,

I am using a subform to list results of a user-defined
search. However, I cannot seem to get the subform to take
the new filter and requery. This is my first time working
with subforms, so I'm sure I'm doing something wrong.

Me.SubFormCtrName.Form.Filter = "-- where condition --"
Me.SubFormCtrName.Form.Requery

Should this work? Is there something else I should do, or
a different approach than using the filter setting?

Thanks!
Gurtz
[email = no $]
 
G

Gurtz

Thanks for your help,

I did as you said:

LV_Results.Form.FilterOn = True
LV_Results.Form.Filter = "(LV_table.TagNum=""" &
[TagNum_CBox] & """ And """ & [TagNum_CBox] & """ <>"""")"

But now it gives a runtime error "You cancelled the
previous operation."

Any ideas about this error? I couldn't find any help on it.
Thanks!
Gurtz
 
G

Gurtz

Desregard. I found a different way to do it, thanks!
Gurtz
-----Original Message-----
Thanks for your help,

I did as you said:

LV_Results.Form.FilterOn = True
LV_Results.Form.Filter = "(LV_table.TagNum=""" &
[TagNum_CBox] & """ And """ & [TagNum_CBox] & """ <>"""")"

But now it gives a runtime error "You cancelled the
previous operation."

Any ideas about this error? I couldn't find any help on it.
Thanks!
Gurtz

-----Original Message-----


When you change a form's filter property, it will requery
automatically so you should not need that line. I think the
problem is that you probably forgot to turn the filter on.
Try this instead:

Me.SubFormCtrName.Form.Filter = "-- where condition --"
Me.SubFormCtrName.Form.FilterON = True
.
 

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