I added a RunReport cmd to a macro I used to create the report from a button on a form. Recently when I had a problem with "duplicate previoud record"
all my macros were converted to modules so code could be added to fix. I not too well verse in VBA and not sure why the report gets created but goes directly to print.
Thanks for any help you can provide
Private Sub Create_Weekly_Location_ID_Summary_Click()
On Error GoTo Create_Weekly_Location_ID_Summary_Click_Err
' _AXL:<?xml version="1.0" encoding="UTF-16" standalone="no"?>
' <UserInterfaceMacro For="Create Invoice" Event="OnClick" xmlns="http://schemas.microsoft.com/office/accessservices/2009/11/application"><Statements><Action Name="OpenForm"><Argument Name="For
' _AXL:mName">frmReports</Argument></Action></Statements></UserInterfaceMacro>
DoCmd.OpenQuery "Delete Weekly Location ID Summary", acViewNormal, acEdit
DoCmd.OpenQuery "Create Weekly Location ID Summary", acViewNormal, acEdit
DoCmd.OpenQuery "Update Invoice Total", acViewNormal, acEdit
DoCmd.OpenReport "Weekly Location ID Summary", acViewNormal, acEdit
Create_Weekly_Location_ID_Summary_Click_Exit:
Exit Sub
Create_Weekly_Location_ID_Summary_Click_Err:
MsgBox Error$
Resume Create_Weekly_Location_ID_Summary_Click_Exit
End Sub
all my macros were converted to modules so code could be added to fix. I not too well verse in VBA and not sure why the report gets created but goes directly to print.
Thanks for any help you can provide
Private Sub Create_Weekly_Location_ID_Summary_Click()
On Error GoTo Create_Weekly_Location_ID_Summary_Click_Err
' _AXL:<?xml version="1.0" encoding="UTF-16" standalone="no"?>
' <UserInterfaceMacro For="Create Invoice" Event="OnClick" xmlns="http://schemas.microsoft.com/office/accessservices/2009/11/application"><Statements><Action Name="OpenForm"><Argument Name="For
' _AXL:mName">frmReports</Argument></Action></Statements></UserInterfaceMacro>
DoCmd.OpenQuery "Delete Weekly Location ID Summary", acViewNormal, acEdit
DoCmd.OpenQuery "Create Weekly Location ID Summary", acViewNormal, acEdit
DoCmd.OpenQuery "Update Invoice Total", acViewNormal, acEdit
DoCmd.OpenReport "Weekly Location ID Summary", acViewNormal, acEdit
Create_Weekly_Location_ID_Summary_Click_Exit:
Exit Sub
Create_Weekly_Location_ID_Summary_Click_Err:
MsgBox Error$
Resume Create_Weekly_Location_ID_Summary_Click_Exit
End Sub