Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-access > #10958
| From | Ulrich Möller <knobbi38@arcor.de> |
|---|---|
| Newsgroups | comp.databases.ms-access |
| Subject | Re: Update form SQL based on client's Field filtering? |
| Date | 2015-07-23 22:30 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <moripe$fsn$1@dont-email.me> (permalink) |
| References | <e2909312-2122-4ba5-8163-bd494683def7@googlegroups.com> |
Am 23.07.2015 um 17:48 schrieb Barry Wright:
> I have a sub form on a form. The sub form displays all sales transactions for a store location. What the client wants to do is use the sub form's field filters to further narrow the records selected. Unfortunately using the field filters doesn't remove the unselected records from the sub form it just hids them. So how can I update the SQL statement of the sub form so that only the filtered records will be displayed? I've tried CurrentDb.QueryDefs("qryTemp3").SQL = Form_subfrmCustomer.RecordSource but it puts all the filtered and unfiltered records into qryTemp3.
>
> Would really appreciate any insight into this issue, thanks.
> Barry
Hi Barry,
don't know, what you mean by hiding records, but you can use the forms
applyfilter event. In the event handler read the me.filter property,
use that value for modifying your forms recordsource or querydef and
afterwards cancel the event. The applytype ist used for determining
whether the filter should be set or unset.
Ulrich
Back to comp.databases.ms-access | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Update form SQL based on client's Field filtering? Barry Wright <barry.edmund.wright@witstoronto.ca> - 2015-07-23 08:48 -0700
Re: Update form SQL based on client's Field filtering? Mike P <mikewpayne@tiscali.co.uk> - 2015-07-23 11:01 -0700
Re: Update form SQL based on client's Field filtering? Ulrich Möller <knobbi38@arcor.de> - 2015-07-23 22:30 +0200
Re: Update form SQL based on client's Field filtering? Barry Wright <barry.edmund.wright@witstoronto.ca> - 2015-07-25 20:56 -0700
Re: Update form SQL based on client's Field filtering? Patrick Finucane <patrickfinucanetx@gmail.com> - 2015-07-24 06:26 -0700
csiph-web