DMax question

J

JMorrell

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,
 
W

Wayne Morgan

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?
 
L

LGC

If PubID is numeric, drop the quote:

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

david epsom dot com dot au

DueDate is type date.


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

(david)
 
Top