Hello All,
I have a button I need to use in a form to run the following Append Queries
Aerial Lift Append, CPR Append, Defensive Driving Append, Flagging Append,
Forklift Append, Ladder Handling Append, and Pole Climbing Append
I am using this for the Aerial Lift Append but want to be able to add the
others at the same time.
Private Sub Command13_Click()
On Error GoTo Err_Command13_Click
Dim stDocName As String
stDocName = "Aerial Lift Append"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_Command13_Click:
Exit Sub
Err_Command13_Click:
MsgBox Err.Description
Resume Exit_Command13_Click
End Sub
Will you help me PLEASE?!!!

Signature
Scot Rawlings
Technical Trainer
Comcast
Auburn, WA
fredg - 14 Aug 2007 22:45 GMT
> Hello All,
>
[quoted text clipped - 24 lines]
>
> Will you help me PLEASE?!!!
Do you wish to get a Warning message for each query?
If Not, then use SetWarnings False
Private Sub Command13_Click()
On Error GoTo Err_Command13_Click
Dim stDocName As String
DoCmd.SetWarnings False
stDocName = "Aerial Lift Append"
DoCmd.OpenQuery stDocName
DoEvents
stDocName = "CPR Append"
DoCmd.OpenQuery stDocName
DoEvents
etc... for each additional query
DoCmd.SetWarnings True
Exit_Command13_Click:
Exit Sub
Err_Command13_Click:
MsgBox Err.Description
Resume Exit_Command13_Click
End Sub

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
John Spencer - 15 Aug 2007 12:47 GMT
You should be able to do something like the following
Private Sub Command13_Click()
On Error GoTo Err_Command13_Click
Dim dbAny as DAO.Database
Set dbAny = CurrentDb()
dbAny.Execute "Aerial Lift Append", dbfailOnError
'Optional code on next line
Msgbox "Added " & dbAny.RecordsAffected & " Aerial Lift records"
dbany.Execute "CPD Append", dbfailOnError
dbAny.Execute ...

Signature
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.
> Hello All,
>
[quoted text clipped - 25 lines]
>
> Will you help me PLEASE?!!!