why does report's filter setting seem to disappear in a macro?

  • Thread starter Thread starter Ted
  • Start date Start date
T

Ted

i created a pair of reports, "PRMC Minutes (Expedited)"
and "PRMC Minutes (Non Expedited)". in the first, i set
the filter to [PRMC_Review] = "Expedited" and the filter
to 'On'. in the second, i set the filter to [PRMC_Review]
<> "Expedited" and the filter to 'On'. each seems to
restrict its records to the desired subset when run
indepedendtly. but, when i invoke each in a macro, a funny
thing happens.....the filtering seems to have vanished!?

i don't get this?!!

anybody like to venture a theory (workaround)??
 
Try putting your filter criteria in the 'WHERE' part of
the VBA code or macro you are using to invoke the report.
I believe the 'Filter' is reserved for a 'named' filter
that you have saved and not the literal filter criteria
[PRMC_Review] = "Expedited". I've run into this myself.

Good luck!
 
hi,

i didn't think it relevant to say i already have a filter
on it (i.e. [PRMC_mtg_dte]=[Forms]![PRMC Minutes Mtg]!
[MeetingDate]). having already tried adding the said
filter strings to the WHERE condition of my macro action
statement, i believe i began getting these messages from
ms a2k about the statement being too complex.

between a rock and a hard place.

how would you create a named filter?

-----Original Message-----
Try putting your filter criteria in the 'WHERE' part of
the VBA code or macro you are using to invoke the report.
I believe the 'Filter' is reserved for a 'named' filter
that you have saved and not the literal filter criteria
[PRMC_Review] = "Expedited". I've run into this myself.

Good luck!
-----Original Message-----
i created a pair of reports, "PRMC Minutes (Expedited)"
and "PRMC Minutes (Non Expedited)". in the first, i set
the filter to [PRMC_Review] = "Expedited" and the filter
to 'On'. in the second, i set the filter to [PRMC_Review]
<> "Expedited" and the filter to 'On'. each seems to
restrict its records to the desired subset when run
indepedendtly. but, when i invoke each in a macro, a funny
thing happens.....the filtering seems to have vanished!?

i don't get this?!!

anybody like to venture a theory (workaround)??
.
.
 
Hi,

Not being an expert at macros (never use them) is there
any way you can use VBA to invoke your report? I know I
can help you with the string then.

?????
-----Original Message-----
hi,

i didn't think it relevant to say i already have a filter
on it (i.e. [PRMC_mtg_dte]=[Forms]![PRMC Minutes Mtg]!
[MeetingDate]). having already tried adding the said
filter strings to the WHERE condition of my macro action
statement, i believe i began getting these messages from
ms a2k about the statement being too complex.

between a rock and a hard place.

how would you create a named filter?

-----Original Message-----
Try putting your filter criteria in the 'WHERE' part of
the VBA code or macro you are using to invoke the report.
I believe the 'Filter' is reserved for a 'named' filter
that you have saved and not the literal filter criteria
[PRMC_Review] = "Expedited". I've run into this myself.

Good luck!
-----Original Message-----
i created a pair of reports, "PRMC Minutes (Expedited)"
and "PRMC Minutes (Non Expedited)". in the first, i set
the filter to [PRMC_Review] = "Expedited" and the filter
to 'On'. in the second, i set the filter to [PRMC_Review]
<> "Expedited" and the filter to 'On'. each seems to
restrict its records to the desired subset when run
indepedendtly. but, when i invoke each in a macro, a funny
thing happens.....the filtering seems to have vanished!?

i don't get this?!!

anybody like to venture a theory (workaround)??
.
.
.
 
Back
Top