B
BruceM
I have constructed a Vendor database. At intervals we need to send
information requests to certain vendors (the Approved Vendors). These
requests are faxed, so I have constructed a report to be printed. I have
based the report on a query that includes only the Approved Vendors and
filters for a date range (or for vendors from whom information has already
been requested, but who have not responded). A user-defined function in a
standard module is the Control Source for a text box on the report; it tests
for dates and other conditions, and produces text accordingly. For
instance, the text is "Information due soon" or "This is the second
request", as needed. If the first condition is met, an integer named
intStatus is assigned the value 1; if the second condition is met, its value
is 2, and so forth. There are about twelve conditions, with Select Case to
specify the text string to use for each condition:
Select Case intStatus
Case 1
strFirstStatement (defined elsewhere in the function)
Case 2
strSecondStatement
etc.
End Select
This works as it should, after generous assistance from the good folks here.
The final piece (I think) is about the three formats I mentioned in the
Subject line of this posting. In some cases the information request is a
single page explaining the information being sought; in another case it is
the explanation page, with a survey on the second page; the third condition
is the same as the second, but with a different survey. My idea is that I
will use subreports as the surveys, and will hide them or show them as
needed.
If this is a reasonable approach, does it make sense to use a Select Case
statement in the function to specify whether to show a subreport? If so,
would I need to use the Reports!MyReport!MySubreport naming system (since
the function is in its own module rather than in the report's code module)?
Or does an entirely different approach suggest itself?
I have tried to provide enough information to explain the situation, without
getting bogged down in excessive detail. I can certainly provide additional
information as needed, in case I left out something important.
information requests to certain vendors (the Approved Vendors). These
requests are faxed, so I have constructed a report to be printed. I have
based the report on a query that includes only the Approved Vendors and
filters for a date range (or for vendors from whom information has already
been requested, but who have not responded). A user-defined function in a
standard module is the Control Source for a text box on the report; it tests
for dates and other conditions, and produces text accordingly. For
instance, the text is "Information due soon" or "This is the second
request", as needed. If the first condition is met, an integer named
intStatus is assigned the value 1; if the second condition is met, its value
is 2, and so forth. There are about twelve conditions, with Select Case to
specify the text string to use for each condition:
Select Case intStatus
Case 1
strFirstStatement (defined elsewhere in the function)
Case 2
strSecondStatement
etc.
End Select
This works as it should, after generous assistance from the good folks here.
The final piece (I think) is about the three formats I mentioned in the
Subject line of this posting. In some cases the information request is a
single page explaining the information being sought; in another case it is
the explanation page, with a survey on the second page; the third condition
is the same as the second, but with a different survey. My idea is that I
will use subreports as the surveys, and will hide them or show them as
needed.
If this is a reasonable approach, does it make sense to use a Select Case
statement in the function to specify whether to show a subreport? If so,
would I need to use the Reports!MyReport!MySubreport naming system (since
the function is in its own module rather than in the report's code module)?
Or does an entirely different approach suggest itself?
I have tried to provide enough information to explain the situation, without
getting bogged down in excessive detail. I can certainly provide additional
information as needed, in case I left out something important.