L
LiquorGuy via AccessMonster.com
Hello,
I am trying to create and unpaid aging invoice report. I have used to forum
to obtain several hints and have been able to create a basic aging inventory
report that looks as follows:
SELECT tblOrders.AcctNumber, tblOrders.ItemNumber, tblOrders.InvoiceDate, IIf
(DateDiff("d",InvoiceDate,Date())<=30,InvoiceAmount,0) AS [0-30], IIf
(DateDiff("d",InvoiceDate,Date())>30 And DateDiff("d",InvoiceDate,Date())<=60,
InvoiceAmount,0) AS [31-60], IIf(DateDiff("d",InvoiceDate,Date())>60 And
DateDiff("d",InvoiceDate,Date())<=90,InvoiceAmount,0) AS [61-90], IIf
(DateDiff("d",InvoiceDate,Date())>90,InvoiceAmount,0) AS [91+]
FROM (tblCustomers INNER JOIN Payments ON tblCustomers.AcctNumber=Payments.
AcctNumber) INNER JOIN tblOrders ON tblCustomers.AcctNumber=tblOrders.
AcctNumber;
This just displays a query that shows invoices that are within a specified
date range i realize. My questions are as follows:
1) what is the significance of the "d" in the code above, and how can I
eliminate it without getting the invalid arguments error. As it stands right
now, I am prompted for 2 parameter values, the customer name & customer
address.. I can click through those but I would like to eliminate the error
all together
2) How can I modify this code so that it shows unpaid balances as opposed to
all invoices?
Thank you!
I am trying to create and unpaid aging invoice report. I have used to forum
to obtain several hints and have been able to create a basic aging inventory
report that looks as follows:
SELECT tblOrders.AcctNumber, tblOrders.ItemNumber, tblOrders.InvoiceDate, IIf
(DateDiff("d",InvoiceDate,Date())<=30,InvoiceAmount,0) AS [0-30], IIf
(DateDiff("d",InvoiceDate,Date())>30 And DateDiff("d",InvoiceDate,Date())<=60,
InvoiceAmount,0) AS [31-60], IIf(DateDiff("d",InvoiceDate,Date())>60 And
DateDiff("d",InvoiceDate,Date())<=90,InvoiceAmount,0) AS [61-90], IIf
(DateDiff("d",InvoiceDate,Date())>90,InvoiceAmount,0) AS [91+]
FROM (tblCustomers INNER JOIN Payments ON tblCustomers.AcctNumber=Payments.
AcctNumber) INNER JOIN tblOrders ON tblCustomers.AcctNumber=tblOrders.
AcctNumber;
This just displays a query that shows invoices that are within a specified
date range i realize. My questions are as follows:
1) what is the significance of the "d" in the code above, and how can I
eliminate it without getting the invalid arguments error. As it stands right
now, I am prompted for 2 parameter values, the customer name & customer
address.. I can click through those but I would like to eliminate the error
all together
2) How can I modify this code so that it shows unpaid balances as opposed to
all invoices?
Thank you!