Calling different reports

  • Thread starter Thread starter ac
  • Start date Start date
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.
 
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
 
Back
Top