Last Date

D

DS

I'm trying to find the last Date a transaction occured for a particular
customer and the DMax doesn't seem to be working. Should I be using
something else?

Forms!Form6!Text2 = DMax("ChkDate", "tblChecks", "ChkCustomerID = " &
Forms!Form6!Text0)

Thnaks
DS
 
M

Maurice

Why not create a regular query sorted by Date descending and try that
instead. You could use a Dlookup for that. Try something like:

Forms!Form6!Text2 = DLookup("ChkDate", "YourQuery", "ChkCustomerID = " &
Forms!Form6!Text0) - where yourquery references the query you made.

Maurice
 
O

Ofer Cohen

It should work, what do you get?

If the ChkCustomerID field is text then try
Forms!Form6!Text2 = DMax("ChkDate", "tblChecks", "ChkCustomerID = '" &
Forms!Form6![Text0] & "'")

Make sure that the name of the text box spelled correctly
 
D

DS

It works! Now, for whatever reason!
DS
DS
Ofer Cohen said:
It should work, what do you get?

If the ChkCustomerID field is text then try
Forms!Form6!Text2 = DMax("ChkDate", "tblChecks", "ChkCustomerID = '" &
Forms!Form6![Text0] & "'")

Make sure that the name of the text box spelled correctly
--
Good Luck
BS"D


DS said:
I'm trying to find the last Date a transaction occured for a particular
customer and the DMax doesn't seem to be working. Should I be using
something else?

Forms!Form6!Text2 = DMax("ChkDate", "tblChecks", "ChkCustomerID = " &
Forms!Form6!Text0)

Thnaks
DS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top