Chimp8471
Registered User.
- Local time
- Today, 11:01
- Joined
- Mar 18, 2003
- Messages
- 353
i keep getting that above message when i click on my exit database button, which i hach put on one of my forms.
the code behind that button is as follows, would appreciate it if you could see anything obvious that would cause this error.
Option Compare Database
Option Explicit
Private Sub Command3_Click()
On Error GoTo Err_Command3_Click
Dim intResponse As Integer
Dim db As DAO.Database
Dim rst As DAO.Recordset
Set db = currentdb()
Set rst = db.OpenRecordset("ztblUserLog", dbOpenDynaset)
Forms!fmnuMainMenu.Visible = False
intResponse = MsgBox("Warning: You are about to completely exit the database." & Chr(13) & _
"Are you sure you want to do this?", vbYesNo + vbExclamation, "Exiting Database")
Select Case intResponse
Case vbYes
rst.FindLast "SecurityID = " & User.SecurityID
rst.Edit
rst!TimeOut = Now()
rst.Update
DoCmd.Quit
Case Else
Forms!fmnuMainMenu.Visible = True
End Select
Exit_Command3_Click:
Exit Sub
Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click
End Sub
Cheers
Andy
the code behind that button is as follows, would appreciate it if you could see anything obvious that would cause this error.
Option Compare Database
Option Explicit
Private Sub Command3_Click()
On Error GoTo Err_Command3_Click
Dim intResponse As Integer
Dim db As DAO.Database
Dim rst As DAO.Recordset
Set db = currentdb()
Set rst = db.OpenRecordset("ztblUserLog", dbOpenDynaset)
Forms!fmnuMainMenu.Visible = False
intResponse = MsgBox("Warning: You are about to completely exit the database." & Chr(13) & _
"Are you sure you want to do this?", vbYesNo + vbExclamation, "Exiting Database")
Select Case intResponse
Case vbYes
rst.FindLast "SecurityID = " & User.SecurityID
rst.Edit
rst!TimeOut = Now()
rst.Update
DoCmd.Quit
Case Else
Forms!fmnuMainMenu.Visible = True
End Select
Exit_Command3_Click:
Exit Sub
Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click
End Sub
Cheers
Andy