Basic Function Not Defined

N

Nick

I recently changed jobs and I'm trying to run a database I used a few years
ago. I haven't changed a thing, and I'm getting a compile error when I first
open it on the following code:

The Compile error points to the Max function below...

Public Function DateConfigure(MaxMasterTableRowDate As Date)

Dim CMSrst As DAO.Recordset
Dim db1 As DAO.Database
Dim MaxDateInSourceData As Date

'check table name
Set db1 = CurrentDb()

Set CMSrst = db1.OpenRecordset("root_hsplit", dbOpenDynaset)

MaxDateInSourceData = Max(CMSrst.Fields(0)) ' --> Compile error here....

If MaxMasterTableRowDate = MaxDateInSourceData Then
DateConfigure = MaxMasterTableRowDate
Else
DateConfigure = MaxDateInSourceData
End If
End Function

I can't figure out why?? I have all of the basic references setup, and none
are labeled "MISSING". Someone please advise?

Thanks,
Nick
 
N

Nick

I don't have a Max, I can't figure out what is going on....changed to DMax,
it compiles now, I'll see soon if it works....thanks.
 

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