Calling different reports

A

ac

I need to call a different report depending on whether an
Account is active or not. The operator running the report
only knows the AccountID and not the status. How can I
program a form that will call the appropriate report? I
was thinking that after the operator inputs the AccountID
I populate another box on the form with the status and
then use both as input for calling the correct report, but
I have no idea how to write the code. Some pointers would
be greatly appreciated.
 
R

Ron Weiner

AC

Without a lot more detail about your database all we can do is to give you a
general outline. You probable can use a simple IF THEN ELSE construct to do
what you want. Code might look like:

blnAccountStatus = your code here to determine if the account is active
' Assumes that active accounts would be True and inactive accounts are False
if blnAccountStatus then
' Run the report for active accounts
else
' Run the report for inactive accounts
end if

Ron W
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top