I have a problem with building a totals query showing data
for the last date only.Under the last date i understand the last date of field invoicedate.This invoice date is in the table orders.
Therefore in the column of the query i have entered :
DMax("InvoiceDate";"Orders")
I have also tried with :
DayNumber: DatePart('d';[invoicedate])
However both my approaches have led to a query that does not show the right results.This is because i do not understand well the functions of Date part and DMax.
Can somebody help me building the query ? My aim is to show
the quantity from all those invoices that have an invoice
with an invoice date equal to the last date of the orders
entered.
Comments
: for the last date only.Under the last date i understand the last date of field invoicedate.This invoice date is in the table orders.
: Therefore in the column of the query i have entered :
:
: DMax("InvoiceDate";"Orders")
:
: I have also tried with :
:
: DayNumber: DatePart('d';[invoicedate])
:
:
:
: However both my approaches have led to a query that does not show the right results.This is because i do not understand well the functions of Date part and DMax.
: Can somebody help me building the query ? My aim is to show
: the quantity from all those invoices that have an invoice
: with an invoice date equal to the last date of the orders
: entered.
:
:
:
:
:
:
[blue]
I like to use sub queries instead of Domain functions. Under the criteria for the InvoiceDate field try this.
[code]
(Select Max([InvoiceDate]) FROM Orders)
[/code]
your DMax("InvoiceDate";"Orders") function should of worked. Make sure you are puting it in the criteria section of the query and not makeing it a column in the query.
[/blue]