J
Jeff Hunt
I have a query called qryMain that is the data source for a form. Currently
it is made of a table (tblAssociates) and a query (qryMaxDate). The
qryMaxDate is used to filter the associate list so that only the active
people (most recently downloaded) show up in the form. Now I am trying to
make it so the user can select to show outdated associates as well. I wrote
an IIF statement in the criteria that *almost* does what I want. It looks
like:
IIf([forms]![frmMain]![chkShowInactiveAssoc]=0,
[qryTblAssociatesMaxDate].[MaxOfLastDownloaded],
[tblAssociates].[LastDownloaded])
The reason that I don't like this solution is that it shows current and old
associates, and I would rather show just the old associates when
chkShowInactiveAssociates is checked. What I tried to write was something
like this:
IIf([forms]![frmMain]![chkShowInactiveAssoc]=0,
[qryTblAssociatesMaxDate].[MaxOfLastDownloaded],
<>[qryTblAssociatesMaxDate].[MaxOfLastDownloaded])
But that doesn't work. I've tried a bunch of different variations (less
than, not in, not like, etc) but can't seem to make it work. Is there a
simple way to make it show a range of dates based on a form-bound criteria?
Thanks.
....jeff...
it is made of a table (tblAssociates) and a query (qryMaxDate). The
qryMaxDate is used to filter the associate list so that only the active
people (most recently downloaded) show up in the form. Now I am trying to
make it so the user can select to show outdated associates as well. I wrote
an IIF statement in the criteria that *almost* does what I want. It looks
like:
IIf([forms]![frmMain]![chkShowInactiveAssoc]=0,
[qryTblAssociatesMaxDate].[MaxOfLastDownloaded],
[tblAssociates].[LastDownloaded])
The reason that I don't like this solution is that it shows current and old
associates, and I would rather show just the old associates when
chkShowInactiveAssociates is checked. What I tried to write was something
like this:
IIf([forms]![frmMain]![chkShowInactiveAssoc]=0,
[qryTblAssociatesMaxDate].[MaxOfLastDownloaded],
<>[qryTblAssociatesMaxDate].[MaxOfLastDownloaded])
But that doesn't work. I've tried a bunch of different variations (less
than, not in, not like, etc) but can't seem to make it work. Is there a
simple way to make it show a range of dates based on a form-bound criteria?
Thanks.
....jeff...