In the following VBA code, where I am using the SendObject Command how can I get it to only SendObject if within the Publisher Data tale, the field supplier is say equal to 1234? I know this is a simple question but I am relatively new to this but really want to learn!
Thanks in advance for any help!
Function MacroModuleQueryTest()
On Error GoTo MacroModuleQueryTest_Err
DoCmd.OpenQuery "QUERY_CLEARPOATEST", acNormal, acEdit
DoCmd.OpenQuery "QUERY_APPENDCHP_LOAD_POA_STATUS", acNormal, acEdit
DoCmd.OpenQuery "QUERY_APPENDCHP_POA_STATUS", acNormal, acEdit
DoCmd.OpenQuery "QUERY_INVALTUPC", acNormal, acEdit
DoCmd.OpenQuery "QUERY_APPENDINGTOPUBLISHERDATA", acNormal, acEdit
DoCmd.SendObject acTable, "Publisher Data", "MicrosoftExcel(*.xls)", "cbotham@indigo.ca", "", "", "", "", False, ""
MacroModuleQueryTest_Exit:
Exit Function
MacroModuleQueryTest_Err:
MsgBox Error$
Resume MacroModuleQueryTest_Exit
End Function
Thanks in advance for any help!
Function MacroModuleQueryTest()
On Error GoTo MacroModuleQueryTest_Err
DoCmd.OpenQuery "QUERY_CLEARPOATEST", acNormal, acEdit
DoCmd.OpenQuery "QUERY_APPENDCHP_LOAD_POA_STATUS", acNormal, acEdit
DoCmd.OpenQuery "QUERY_APPENDCHP_POA_STATUS", acNormal, acEdit
DoCmd.OpenQuery "QUERY_INVALTUPC", acNormal, acEdit
DoCmd.OpenQuery "QUERY_APPENDINGTOPUBLISHERDATA", acNormal, acEdit
DoCmd.SendObject acTable, "Publisher Data", "MicrosoftExcel(*.xls)", "cbotham@indigo.ca", "", "", "", "", False, ""
MacroModuleQueryTest_Exit:
Exit Function
MacroModuleQueryTest_Err:
MsgBox Error$
Resume MacroModuleQueryTest_Exit
End Function