DMax for dates

JCross

Registered User.
Local time
Today, 14:28
Joined
Feb 28, 2002
Messages
116
hi all,

I need to find the InvoiceDate from tblInvoice that was most recently entered using frmInventory.InventoryDate as the criterea. For some reason I can't make my DMax work.

I have a query that finds the DMax date in the tblInvoice, but how do I get the InventoryDate field in as the criterea????I tried <=Forms!frmInventory!InventoryDate in the DMax field and it didn't work.

Thank you.

Jennifer
 
Basically, skip the DMax function, use Max:

SELECT Max(InvoiceDate)
FROM YourTable
WHERE InvoiceDate <=Forms!frmInventory!InventoryDate

If this isn't working for you (your info is
is rather common..), post your SQL statement and some more background info.

RV
 
Thank you! I knew it was common - I just couldn't seem to make it work. Thanks for the answer.

Jennifer
 

Users who are viewing this thread

Back
Top Bottom