D
Dave
I am attempting to import forms (and code) from a sample
database call LogUsersOff2K.mdb from
http://www.rogersaccesslibrary.com/
I am trying to import the forms (and code) to an existing
database, however I am getting this error on the event ON
LOAD for the form frmLogOff.
"User-defined type not defined"
The error highlights on the first DIM statement
on "DAO.Database"
What else do I need to import or establish in my existing
database to not receive this error message?
'*** Actual Code in the ON LOAD event *****
Private Sub Form_Load()
Dim db As DAO.Database
Dim snp As DAO.Recordset
Dim msg As String
Set db = CurrentDb
Set snp = db.OpenRecordset("Settings", dbOpenSnapshot)
If snp![logoff] Then
msg = "The database is closed for updating" & vbCrLf &
vbCrLf & "Please try later."
MsgBox msg
Application.Quit
End If
DoCmd.Hourglass False
End Sub
' *****End of Actual code *****************************
database call LogUsersOff2K.mdb from
http://www.rogersaccesslibrary.com/
I am trying to import the forms (and code) to an existing
database, however I am getting this error on the event ON
LOAD for the form frmLogOff.
"User-defined type not defined"
The error highlights on the first DIM statement
on "DAO.Database"
What else do I need to import or establish in my existing
database to not receive this error message?
'*** Actual Code in the ON LOAD event *****
Private Sub Form_Load()
Dim db As DAO.Database
Dim snp As DAO.Recordset
Dim msg As String
Set db = CurrentDb
Set snp = db.OpenRecordset("Settings", dbOpenSnapshot)
If snp![logoff] Then
msg = "The database is closed for updating" & vbCrLf &
vbCrLf & "Please try later."
MsgBox msg
Application.Quit
End If
DoCmd.Hourglass False
End Sub
' *****End of Actual code *****************************