Get Individual Filter by Form Clauses?

G

Gcook888

For example filtering on my Date text box I enter in

"Between #1/1/01# And #1/1/02"

And I'd like to get this literally from some property or something w/o having
to do a massive/impossible parse job on the complete Me.Filter result.

Something like Me.Date.Filter.Clause

Also I've noticed Filter by Form doesn't And with a subform clause. Any cool
ways around that? You end up w/separate Me.Filter and Me.subform.form.filter.

Also any generic method to change a given recordset to a recordsource? The
recordset comes easy with recordsetclone but the combination of Mainform
Recordsource and subform recordsource gets complicated in my problem.

Finally.That's all.
 
A

Allen Browne

There is no simple way to parse the filter and convert it into an English
description. If you are building up the Filter string for a form or report
programatically, it's probably easiest to build a parallel description
string, and then display it where desired rather than to try to parse and
interpret the Filter string afterwards.

Access can't filter a form on a field that is not in the form's Recordset.
The solution is to reassign the RecordSource of the form so the field is
there. Details in article:
Filter a Form on a Field in a Subform
at:
http://allenbrowne.com/ser-28.html

You may also need to be aware that Access can get confused if you apply a
filter to the main form and also to the subform. When you remove one of the
filters, it fails to understand that the other is still operational. As a
result, you can't display all the records again without closing the form and
reopening it.
 

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