Set TAG property before opening Report

  • Thread starter Thread starter TC
  • Start date Start date
T

TC

Frank B said:
Before opening a report I want to set the contents of the
report's TAG property to either "A" or "B". When the
Report is Opened, the TAG value then can be used for a VBA
decision in the report's OnActivate event. How would I
set the TAG property before the Report is opened?
Thanks.... Frank


Why not just declare a global variable in a standard module & pass the value
through that?

HTH,
TC
 
Before opening a report I want to set the contents of the
report's TAG property to either "A" or "B". When the
Report is Opened, the TAG value then can be used for a VBA
decision in the report's OnActivate event. How would I
set the TAG property before the Report is opened?
Thanks.... Frank
 
Thanks TC. I thought about using a Field in a form, but a
Global would certainly be less effort.

Anyway, because it has me puzzled, I would still like to
know how to set that TAG field before activating the
report. Is it possible to open a report without activating
it (other than design mode)? I guess I could open it in
design, set TAG, close it, then activate it. Kinda
kludgey. Thanks your your thoughts.... Frank
 
or just use the OpenArgs on the OpenReport.

expression.OpenReport(ReportName, View, FilterName, WhereCondition,
WindowMode, OpenArgs)



Then in the report you can detect what was passed using Me.OpenArgs rather
than Tag values

ie if me.openargs = "B" then. . . . .
 
Hi, again,

I'm using Acces 2k. Looks like it doesn't support the
OpenArgs on the OpenReport. It does on OpenForm, but that
does me no good. What version of Access supports OpenArgs
on the OpenReport? Thanks... Frank
 
Plan B is to reference the original form.

I presume you have a form with a button on that launches the report. On the
report you could do a forsm reference, or if the report is based on a query,
then add it as a field, ie
Select FirstField, SecondField . . .. Forms!FormName!HiddenControlName AS
AorB From . .

Then in the report just check the field value.
 
Back
Top