DataBase - Append Messages

Asked By Erin
03-Feb-10 01:24 PM
I have a form, frmAttendanceTrack, that allows the user to enter a record
when an employee uses vacation time, etc. The user clicks on the "submit"
button to run an append query and append that new record into a table. The

There is a button on frmAttendanceTrack that allows you to get a "quick
reference" of how much vacation time an employee has left. If you click that
button, a small form opens that allows you to look at employee records.

PROBLEM: For some reason, if you use the "quick reference", then close out
of it and try to submit an attendance record from frm Attendance Track, those
dumb "append messages" pop up again!

Why does this happen and how can I fix it??

Thanks!
DoCmd.SetWarnings
(1)
FrmAttendanceTrack
(1)
Attendance
(1)
  Daryl S replied to Erin
03-Feb-10 03:18 PM
Erin -

Search your code for "SetWarnings".  We normally turn them off before
running action queries, and then turn them back on after running them.  It
looks like they are turned back on in the "Quick Reference" piece, which is
probably OK.  It could be you turned them off in the OnCurrent or other form
event, but they should have been turned off right before calling the append
query.  You will need to adjust where these statements are.  They usually
look like this:

DoCmd.SetWarnings False   (or True to turn them on)

--
Daryl S
Create New Account
help
DoCmd.SetWarnings Problem DataBase Hi, I've got a problem with DoCmd.SetWarnings command (Access 2000). The code: DoCmd.SetWarnings False DoCmd.OpenQuery ("ab2") DoCmd.OpenQuery ("ab3") DoCmd.SetWarnings True The queries do some updates on a table. I wanto to supress the warnings
need to select from two table in this SQL statement. How can this be accomplished? DoCmd.SetWarnings False VDSQL = "INSERT INTO tblVoidDetails " & _ DoCmd.RunSQL (VDSQL) DoCmd.SetWarnings True The two Tables are tblCheckDetailsTMP and tblCheckDetails. Would an Or statement work like this? DoCmd.SetWarnings False VDSQL = "INSERT INTO tblVoidDetails " & _ DoCmd.RunSQL (VDSQL DoCmd.SetWarnings True Thanks DS Access Forms Coding Discussions TblCheckDetailsTMP.CDSubGroupID (1) TblCheckDetailsTMP.CDGroupID (1) TblCheckDetailsTMP.CDCheckID
Update table script DataBase Hi, Why this sql script doesnt work? 'UPDATE COLUMNS DoCmd.SetWarnings False DoCmd.RunSQL "UPDATE print_mainlines SET C1 = (SELECT pt_l1 FROM print_lines WHERE L1 = 1) WHERE fid = 1" DoCmd.SetWarnings True Thank you all, Bre-x Access Getting Started Discussions DoCmd.RunSQL (1 DoCmd.SetWarnings (1) Debug.Print (1) Database (1) DMax (1) Bontrager (1) - - Jerry Whittle, Microsoft Access MVP I have another question, I need to run the script 19 times, example 'UPDATE COLUMNS DoCmd.SetWarnings False DoCmd.RunSQL "UPDATE print_mainlines SET C1 = '" & DLookup("[pt_l1]", DoCmd.RunSQL "UPDATE print_mainlines SET C1
reason this isn't UPDATING. . . This gives me a 3144 Error Dim UPSQL As String DoCmd.SetWarnings False UPSQL = "UPDATE tblPass SET tblPass.Type = " & Data & " " & _ DoCmd.RunSQL (UPSQL) DoCmd.SetWarnings True I tried this also. . . This does nothing. . . Dim UPSQL As String DoCmd.SetWarnings False UPSQL = "UPDATE tblPass SET tblPass.Type = " & Data & " " & _ DoCmd.RunSQL (UPSQL DoCmd.SetWarnings True Data is a word. . . . Any help appreciated. Thanks DS Access Forms Coding Discussions DoCmd