[AccessD] Prompt for Proper Union Join Table

Keith Williamson Kwilliamson at RTKL.com
Thu Apr 30 17:09:06 CDT 2009


Hey guys....below I have my Union Join Query:
__________________________
select "New Invs" as [Type], [WBS1] as [Project#], [Invoice] as [Inv#],
[FirstofTransDate] as [Date],  0 as [Balance], 0 as [Retainage],
[Amount] as [NewInvAmt] from [qryARInvoices]

UNION select  "Orig Bals" as [Type], [Project#], [Invoice#] as [Inv#],
[Date], [sumofbalance] as [Balance], [sumofretainage] as [Retainage], 0
as [NewInvAmt] from [qryAR200812]

UNION select "New Invs" as [Type], [WBS1] as [Project#], [Invoice] as
[Inv#], "" as [Date],  0 as [Balance], 0 as [Retainage], 0 as
[NewInvAmt] from [qryARUnappliedPmts];
_______________________

One of the issues I have is that I run this query for two different
reports.  It is the same query, except that I change the [qryAR200812]
to a different query [qryArcadisARBilling] for the second report.
Additionally, two other of the sub-queries need to have this reference
changed.  {essentially, this is a rollforward query of AR from either
12/31/08 or 05/31/07 to current....depending on the user}

My question is....is there a way to prompt for which reference I want to
use [qryAR200812] or [qryArcadisARBilling], and have this query
reference the appropriate sub-queries?

Thanks,

Keith Williamson | Associate, Asst. Controller | kwilliamson at rtkl.com 

RTKL Associates Inc. | 901 South Bond St. | Baltimore, MD  21231

410.537.6098 Direct | 410.276.4232 Fax | www.rtkl.com

--------------------------------------------------------------------------
The information contained in this communication is confidential, may be privileged and is intended for the exclusive use of the above named addressee(s). If you are not the intended recipient(s), you are expressly prohibited from copying, distributing, disseminating, or in any other way using any of the information contained within this communication. If you have received this communication in error, please contact the sender by telephone at (410) 537-6000 or by response via e-mail and permanently delete the original email and any copies.




More information about the AccessD mailing list