A
Arvi Laanemets
Hi
In my App, I run a lot of reports from command button. What kind of output
is used (preview, print or snapshot), which report is started, and for which
year data are selected from source table(s), are determined by 3 controls on
form. All this works fine except for snapshots - I didn't find any way to
limit snapshot to data from one year. Here is a snippet from my code:
....
Select Case varRepOutput
Case "Preview"
DoCmd.OpenReport varRepName, acPreview, , "YearNum=" & varRepYear
Case "Print"
DoCmd.OpenReport varRepName, acNormal, , "YearNum=" & varRepYear
Case "Snapshot"
DoCmd.OutputTo acOutputReport, varRepName, acFormatSNP,
varRepDestination
End Select
....
-----------------
I don't like the idea to have a whole set of almost identical report for
every year - and to add every new year a lot of new ones. So maybe someone
has some better solution.
Thanks in advance
In my App, I run a lot of reports from command button. What kind of output
is used (preview, print or snapshot), which report is started, and for which
year data are selected from source table(s), are determined by 3 controls on
form. All this works fine except for snapshots - I didn't find any way to
limit snapshot to data from one year. Here is a snippet from my code:
....
Select Case varRepOutput
Case "Preview"
DoCmd.OpenReport varRepName, acPreview, , "YearNum=" & varRepYear
Case "Print"
DoCmd.OpenReport varRepName, acNormal, , "YearNum=" & varRepYear
Case "Snapshot"
DoCmd.OutputTo acOutputReport, varRepName, acFormatSNP,
varRepDestination
End Select
....
-----------------
I don't like the idea to have a whole set of almost identical report for
every year - and to add every new year a lot of new ones. So maybe someone
has some better solution.
Thanks in advance