A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Msg: You are about to append.....



 
 
Thread Tools Display Modes
  #1  
Old April 2nd, 2010, 11:02 PM posted to microsoft.public.access.forms
Damon Heron[_3_]
external usenet poster
 
Posts: 257
Default Msg: You are about to append.....

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






  #2  
Old April 2nd, 2010, 11:24 PM posted to microsoft.public.access.forms
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default You are about to append.....

"Damon Heron" wrote in message
...
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.



You don't say what error message you get, but I would suggest you bypass the
whole question and use CurrentDb.Execute rather then RunSQL:

CurrentDb.Execute strsql, dbFailOnError

That won't generate any warning, though it will raise an error if the SQL
statement fails.

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)

  #3  
Old April 3rd, 2010, 12:55 AM posted to microsoft.public.access.forms
Damon Heron[_3_]
external usenet poster
 
Posts: 257
Default You are about to append.....

Thanks, Dirk. That solved the problem with the warning.

Damon

"Dirk Goldgar" wrote in message
...
"Damon Heron" wrote in message
...
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.



You don't say what error message you get, but I would suggest you bypass
the whole question and use CurrentDb.Execute rather then RunSQL:

CurrentDb.Execute strsql, dbFailOnError

That won't generate any warning, though it will raise an error if the SQL
statement fails.

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)



  #4  
Old April 3rd, 2010, 01:16 AM posted to microsoft.public.access.forms
fredg
external usenet poster
 
Posts: 4,386
Default You are about to append.....

On Fri, 2 Apr 2010 18:24:17 -0400, Dirk Goldgar wrote:

"Damon Heron" wrote in message
...
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.


You don't say what error message you get, but I would suggest you bypass the
whole question and use CurrentDb.Execute rather then RunSQL:

CurrentDb.Execute strsql, dbFailOnError

That won't generate any warning, though it will raise an error if the SQL
statement fails.


Shouldn't the SetWarnings commands have been written
DoCmd.SetWarnings False
DoCmd.SetWarnings True

(without the = sign)?

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #5  
Old April 3rd, 2010, 04:23 AM posted to microsoft.public.access.forms
Damon Heron[_3_]
external usenet poster
 
Posts: 257
Default You are about to append.....

Yes,
but I tried it both ways (still got an error msg) and the code below was
remarked out

Damon

"fredg" wrote in message
...
On Fri, 2 Apr 2010 18:24:17 -0400, Dirk Goldgar wrote:

"Damon Heron" wrote in message
...
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.


You don't say what error message you get, but I would suggest you bypass
the
whole question and use CurrentDb.Execute rather then RunSQL:

CurrentDb.Execute strsql, dbFailOnError

That won't generate any warning, though it will raise an error if the SQL
statement fails.


Shouldn't the SetWarnings commands have been written
DoCmd.SetWarnings False
DoCmd.SetWarnings True

(without the = sign)?

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail



  #6  
Old April 3rd, 2010, 07:00 PM posted to microsoft.public.access.forms
Damon Heron[_3_]
external usenet poster
 
Posts: 257
Default You are about to append.....

Yes,
but as a test, I tried it both ways (still got an error msg) and the code
below was
remarked out to show I had tried setting warnings off....

Damon




"fredg" wrote in message
...
On Fri, 2 Apr 2010 18:24:17 -0400, Dirk Goldgar wrote:

"Damon Heron" wrote in message
...
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.


You don't say what error message you get, but I would suggest you bypass
the
whole question and use CurrentDb.Execute rather then RunSQL:

CurrentDb.Execute strsql, dbFailOnError

That won't generate any warning, though it will raise an error if the SQL
statement fails.


Shouldn't the SetWarnings commands have been written
DoCmd.SetWarnings False
DoCmd.SetWarnings True

(without the = sign)?

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:48 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.