Access 2003.
I am trying to get the Max Date value in a table to the variable "LstUpd" but I always get a type mismatch at the SELECT line.
Can someone point me to my error? Thanks!!!
Dim db As Database
Dim rsUpdate As Recordset
Dim LstUpd As Date
Set db = CurrentDb
Set rsUpdate = db.OpenRecordset("tbl_update")
LstUpd = "SELECT Max(tbl_update.last_update) AS As_Of FROM [tbl_update]"
MsgBox "The database was last updated on #" & LstUpd & "#. Do want to update the database?", vbYesNo, "Database Update"
I am trying to get the Max Date value in a table to the variable "LstUpd" but I always get a type mismatch at the SELECT line.
Can someone point me to my error? Thanks!!!
Dim db As Database
Dim rsUpdate As Recordset
Dim LstUpd As Date
Set db = CurrentDb
Set rsUpdate = db.OpenRecordset("tbl_update")
LstUpd = "SELECT Max(tbl_update.last_update) AS As_Of FROM [tbl_update]"
MsgBox "The database was last updated on #" & LstUpd & "#. Do want to update the database?", vbYesNo, "Database Update"