I've got code to run 3 queries, and would the form to refresh, showing the new added records after this runs.
The form is frm_MFR_BRND_EDIT
and the query that this form is based on is 'qry_tblMFRBRND_Local_Acti
veRecords'
Private Sub CommandRunQueries_Click()
On Error GoTo Err_RunQueries
'Turn off Action Query Alerts
DoCmd.SetWarnings False
DoCmd.OpenQuery "qry_NewRecords_Append"
DoCmd.OpenQuery "qry_UpdateDate_NewRecords
"
DoCmd.OpenQuery "qry_DeletedRecords_MarkLo
cal"
'Turn Action Query Alerts back on
DoCmd.SetWarnings True
Exit_RunQueries:
Exit Sub
Err_RunQueries:
MsgBox "Code could not execute!" _
& vbCrLf & vbCrLf & "Error " & Err.Number & ": " _
& vbCrLf & vbCrLf & Error, vbExclamation
Resume Exit_RunQueries
End Sub
Start Free Trial