date field being equal to the lastPaymentDate

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

can anyone tell me why this won't work:

Dim lastPaymentDate As Date
lastPaymentDate = DMax
("Date", "PaymentsReceived", "[memberNumber] = " & Me.
[Member Number])

previouspaymentnumber = DMax
("PaymentID", "PaymentsReceived", "[memberNumber] = " &
Me.[Member Number] & " AND [Date] = " & lastPaymentDate)

I have tried: format(lastPaymentDate, "mm/dd/yyyy") but
it still comes up null. I think that it must be a problem
with the format of the field [date] not being equal to
the lastPaymentDate
 
hi,
Try nesting your date fields between #Date#.
Access may not be recognizing the fields as dates.
the ## symbles would tell access the data is dates.
 
Back
Top