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