D
Damon Heron
Access 2007 - - I have a tblLog that at the opening and closing of the main
form gets written to with the date and time. I have set warnings unchecked
in Access Options. All is well UNTIL I convert it to an MDE, then I get the
message about appending when I open or close the main form, and ONLY the
main form. No other table writes trigger the warning msg. Any ideas? Here
is the code in the form's load event:
'DoCmd.SetWarnings = False (I tried adding this and it triggered an error
msg)
strsql = "INSERT INTO tblLog (LogonTime) values( Now() )"
DoCmd.RunSQL (strsql)
DoCmd.OpenForm "hfrmCloseAccess", , , , , acHidden
ChangeProperty "AllowBypassKey", DB_Boolean, False
And here is the quit button:
Private Sub cmdQuit_Click()
On Error GoTo Err_cmdQuit_Click
Dim strsql As String
'DoCmd.SetWarnings = False (again, commented out because of error msg)
strsql = "INSERT INTO tblLog (LogoutTime) values( Now() )"
DoCmd.RunSQL (strsql)
CloseAllOpenForms
Application.Quit acQuitSaveAll
Exit_cmdQuit_Click:
Exit Sub
Err_cmdQuit_Click:
MsgBox Err.Description
Resume Exit_cmdQuit_Click
End Sub
Any help is appreciated. I am baffled why it only occurs in the MDE
compilation.
Damon
form gets written to with the date and time. I have set warnings unchecked
in Access Options. All is well UNTIL I convert it to an MDE, then I get the
message about appending when I open or close the main form, and ONLY the
main form. No other table writes trigger the warning msg. Any ideas? Here
is the code in the form's load event:
'DoCmd.SetWarnings = False (I tried adding this and it triggered an error
msg)
strsql = "INSERT INTO tblLog (LogonTime) values( Now() )"
DoCmd.RunSQL (strsql)
DoCmd.OpenForm "hfrmCloseAccess", , , , , acHidden
ChangeProperty "AllowBypassKey", DB_Boolean, False
And here is the quit button:
Private Sub cmdQuit_Click()
On Error GoTo Err_cmdQuit_Click
Dim strsql As String
'DoCmd.SetWarnings = False (again, commented out because of error msg)
strsql = "INSERT INTO tblLog (LogoutTime) values( Now() )"
DoCmd.RunSQL (strsql)
CloseAllOpenForms
Application.Quit acQuitSaveAll
Exit_cmdQuit_Click:
Exit Sub
Err_cmdQuit_Click:
MsgBox Err.Description
Resume Exit_cmdQuit_Click
End Sub
Any help is appreciated. I am baffled why it only occurs in the MDE
compilation.
Damon