L
Leslie Isaacs
Hello All
I have been trying to use the ApplyFilter action in a macro, but can't get
it to work. In any case I seem to be finding that it is often better to use
VBA rather than macros, so I was wondering whether there is an equivalent
VBA command to the ApplyFilter macro action.
I have a query [qry_show_p45s] that takes as its record source
[qry_showAll]. [qry_showAll] is the record source for a form
[frm_employees]. I simply want to be able to apply [qry_show_p45s] as a
filter on [frm_employees]. I realise that normally I would simply do
something like:
Me.Filter = "[this]=[that]"
Me.FilterOn = True
.... but [qry_show_p45s] is based on another query and a table, so the
"[this]=[that]" filter would involve a lot of DLookups etc. and would be
quite messy. Also, being the amateur that I am, I find the query design grid
much easier than writing VBA, and it is likely that I will want to amend the
criteria in [qry_show_p45s] quite regularly.
So, is there a way of using VBA to apply [qry_show_p45s] to [frm_employees]
(or should I persevere with the macro)?
Hope someone can help.
Many thanks
Leslie Isaacs
I have been trying to use the ApplyFilter action in a macro, but can't get
it to work. In any case I seem to be finding that it is often better to use
VBA rather than macros, so I was wondering whether there is an equivalent
VBA command to the ApplyFilter macro action.
I have a query [qry_show_p45s] that takes as its record source
[qry_showAll]. [qry_showAll] is the record source for a form
[frm_employees]. I simply want to be able to apply [qry_show_p45s] as a
filter on [frm_employees]. I realise that normally I would simply do
something like:
Me.Filter = "[this]=[that]"
Me.FilterOn = True
.... but [qry_show_p45s] is based on another query and a table, so the
"[this]=[that]" filter would involve a lot of DLookups etc. and would be
quite messy. Also, being the amateur that I am, I find the query design grid
much easier than writing VBA, and it is likely that I will want to amend the
criteria in [qry_show_p45s] quite regularly.
So, is there a way of using VBA to apply [qry_show_p45s] to [frm_employees]
(or should I persevere with the macro)?
Hope someone can help.
Many thanks
Leslie Isaacs