S
Stacey Crowhurst
Hi. I am very new to macros and am having some problems. I have a form that
shows vendor ID and vendor name as a list box. I created a command button to
take me to the transaction report for the vendor that is highlighed from the
list box.
My macro has two lines:
1. Close - closes the transaction report
2. OpenReport - opens the transaction report
For #2 I have a query acting as the filter. Here is the SQL for that query:
SELECT [Transaction - General].[CCP No], [Vendor - Directory].[Vendor ID],
[Vendor - Directory].[Vendor Name], [Transaction - General].[Date Entered],
[Transaction - Status].Status, [Transaction - General].[Check No],
[Transaction - General].[Check Date], [Transaction - Source].[Source Type],
[Transaction - Details].[Invoice No], [Transaction - Details].[Invoice Date],
[Transaction - Details].Contract, Sum([Transaction - Details].[Line Amount])
AS [SumOfLine Amount]
FROM ((([Transaction - Details] INNER JOIN [Transaction - General] ON
[Transaction - Details].[Trans ID] = [Transaction - General].[Trans ID])
INNER JOIN [Vendor - Directory] ON [Transaction - Details].[Vendor ID] =
[Vendor - Directory].[Vendor ID]) INNER JOIN [Transaction - Source] ON
[Transaction - General].Source = [Transaction - Source].[Source ID]) INNER
JOIN [Transaction - Status] ON [Transaction - General].Status = [Transaction
- Status].[Status ID]
GROUP BY [Transaction - General].[CCP No], [Vendor - Directory].[Vendor ID],
[Vendor - Directory].[Vendor Name], [Transaction - General].[Date Entered],
[Transaction - Status].Status, [Transaction - General].[Check No],
[Transaction - General].[Check Date], [Transaction - Source].[Source Type],
[Transaction - Details].[Invoice No], [Transaction - Details].[Invoice Date],
[Transaction - Details].Contract
HAVING ((([Vendor - Directory].[Vendor ID])=[Forms]![F- Look
Up_Vendors]![Vendor List]));
When I click on the command button it just brings up the entire transaction
report for all vendors. I had success doing this for my contract list form
and contract report but can't seem to translate it to work for here. Any
ideas?
Thank you!
shows vendor ID and vendor name as a list box. I created a command button to
take me to the transaction report for the vendor that is highlighed from the
list box.
My macro has two lines:
1. Close - closes the transaction report
2. OpenReport - opens the transaction report
For #2 I have a query acting as the filter. Here is the SQL for that query:
SELECT [Transaction - General].[CCP No], [Vendor - Directory].[Vendor ID],
[Vendor - Directory].[Vendor Name], [Transaction - General].[Date Entered],
[Transaction - Status].Status, [Transaction - General].[Check No],
[Transaction - General].[Check Date], [Transaction - Source].[Source Type],
[Transaction - Details].[Invoice No], [Transaction - Details].[Invoice Date],
[Transaction - Details].Contract, Sum([Transaction - Details].[Line Amount])
AS [SumOfLine Amount]
FROM ((([Transaction - Details] INNER JOIN [Transaction - General] ON
[Transaction - Details].[Trans ID] = [Transaction - General].[Trans ID])
INNER JOIN [Vendor - Directory] ON [Transaction - Details].[Vendor ID] =
[Vendor - Directory].[Vendor ID]) INNER JOIN [Transaction - Source] ON
[Transaction - General].Source = [Transaction - Source].[Source ID]) INNER
JOIN [Transaction - Status] ON [Transaction - General].Status = [Transaction
- Status].[Status ID]
GROUP BY [Transaction - General].[CCP No], [Vendor - Directory].[Vendor ID],
[Vendor - Directory].[Vendor Name], [Transaction - General].[Date Entered],
[Transaction - Status].Status, [Transaction - General].[Check No],
[Transaction - General].[Check Date], [Transaction - Source].[Source Type],
[Transaction - Details].[Invoice No], [Transaction - Details].[Invoice Date],
[Transaction - Details].Contract
HAVING ((([Vendor - Directory].[Vendor ID])=[Forms]![F- Look
Up_Vendors]![Vendor List]));
When I click on the command button it just brings up the entire transaction
report for all vendors. I had success doing this for my contract list form
and contract report but can't seem to translate it to work for here. Any
ideas?
Thank you!