Last Date

  • Thread starter Thread starter DS
  • Start date Start 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
 
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
 
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
 
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
 
Back
Top