DMax question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can I extract the oldest date with the following:

DueDate = DMin("duedate", "requests", "pubid ='" & PubID & "'")

I get a data type mismatch error with this?

tia,
 
What data type is PubID. The way you have this it should be a text data
type. If PubID is a number then try

DueDate = DMin("duedate", "requests", "pubid =" & PubID)

Also, what data type is DueDate defined as in the Dim statement?
 
If PubID is numeric, drop the quote:

DueDate = DMin("duedate", "requests", "pubid = " & PubID )
 
DueDate is type date.


You may also wish to test what happens if PubID does
not match a record in the table.

(david)
 

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

Back
Top