I have written the following Query -
SELECT Transactions.TransactionNumber, Transactions.TransactionDate, Transactions.TransactionDescription, Transactions.WithdrawalAmount, Transactions.DepositAmount
FROM Transactions
WHERE (((Transactions.TransactionDate) Between [Forms]![Report Date Range]![Beginning Report Date] And [Forms]![Report Date Range]![Ending Report Date]))
UNION SELECT DISTINCTROW " " AS TransactionNumber, [Forms]![Report Date Range]![Ending Report Date] AS TransactionDate, "Totals" AS TransactionDescription, SUM(Transactions.WithdrawalAmount) AS WithdrawalAmount, SUM(Transactions.DepositAmount) AS DepositAmount
FROM Transactions
WHERE (((Transactions.TransactionDate) Between [Forms]![Report Date Range]![Beginning Report Date] And [Forms]![Report Date Range]![Ending Report Date]))
UNION SELECT " " AS TransactionNumber, [Forms]![Report Date Range]![Beginning Report Date] AS TransactionDate, "Opening Balance" AS TransactionDescription, "" AS WithdrawalAmount, SUM(Transactions.DepositAmount) - SUM(Transactions.WithdrawalAmount) AS DepositAmount
FROM Transactions
WHERE (((Transactions.TransactionDate) Between [Forms]![Report Date Range]![Beginning Report Date] And [Forms]![Report Date Range]![Beginning Report Date]))
UNION SELECT " " AS TransactionNumber, [Forms]![Report Date Range]![Ending Report Date] AS TransactionDate, "Ending Balance" AS TransactionDescription , "" AS WithdrawalAmount, SUM(Transactions.DepositAmount) - SUM(Transactions.WithdrawalAmount) AS DepositlAmount
FROM Transactions
WHERE (((Transactions.TransactionDate) Between #09/01/01# And [Forms]![Report Date Range]![Ending Report Date]));
The problem is that I believe the <"" AS WithdrawalAmount> part causes the Currency format of the field to be lost so that the printed report prints the DepositAmounts OK ($##.##), but the whole WithdrawalAmount in the report just prints as an unformatted number field. How do I force the <""> to Format Currency in a query?
This is probably a dumb question but I can't seem to find an answer in any "help" files or manuals I have.
SELECT Transactions.TransactionNumber, Transactions.TransactionDate, Transactions.TransactionDescription, Transactions.WithdrawalAmount, Transactions.DepositAmount
FROM Transactions
WHERE (((Transactions.TransactionDate) Between [Forms]![Report Date Range]![Beginning Report Date] And [Forms]![Report Date Range]![Ending Report Date]))
UNION SELECT DISTINCTROW " " AS TransactionNumber, [Forms]![Report Date Range]![Ending Report Date] AS TransactionDate, "Totals" AS TransactionDescription, SUM(Transactions.WithdrawalAmount) AS WithdrawalAmount, SUM(Transactions.DepositAmount) AS DepositAmount
FROM Transactions
WHERE (((Transactions.TransactionDate) Between [Forms]![Report Date Range]![Beginning Report Date] And [Forms]![Report Date Range]![Ending Report Date]))
UNION SELECT " " AS TransactionNumber, [Forms]![Report Date Range]![Beginning Report Date] AS TransactionDate, "Opening Balance" AS TransactionDescription, "" AS WithdrawalAmount, SUM(Transactions.DepositAmount) - SUM(Transactions.WithdrawalAmount) AS DepositAmount
FROM Transactions
WHERE (((Transactions.TransactionDate) Between [Forms]![Report Date Range]![Beginning Report Date] And [Forms]![Report Date Range]![Beginning Report Date]))
UNION SELECT " " AS TransactionNumber, [Forms]![Report Date Range]![Ending Report Date] AS TransactionDate, "Ending Balance" AS TransactionDescription , "" AS WithdrawalAmount, SUM(Transactions.DepositAmount) - SUM(Transactions.WithdrawalAmount) AS DepositlAmount
FROM Transactions
WHERE (((Transactions.TransactionDate) Between #09/01/01# And [Forms]![Report Date Range]![Ending Report Date]));
The problem is that I believe the <"" AS WithdrawalAmount> part causes the Currency format of the field to be lost so that the printed report prints the DepositAmounts OK ($##.##), but the whole WithdrawalAmount in the report just prints as an unformatted number field. How do I force the <""> to Format Currency in a query?
This is probably a dumb question but I can't seem to find an answer in any "help" files or manuals I have.