Hello,
I am looking to create a macro in one main access database that will update other access databases and then return data to my main database based on the parameters I put in. Below is an example of a macro I currently use that has been converted over to VBA. What I want is for the Date Range which is an update query, and the Append 2021 Test Table to live inside another database. The appended table is set to update the table in my main database when run, but I'm not sure how to write that into the VBA. Also, and this is more of a bonus question but I'd like to include it in my macro if possible, is there a way to remove all of the notifications of deleting and appending queries using VBA? I'm still relatively new to VBA, and am self taught so please bear with me. Thank you!
I am looking to create a macro in one main access database that will update other access databases and then return data to my main database based on the parameters I put in. Below is an example of a macro I currently use that has been converted over to VBA. What I want is for the Date Range which is an update query, and the Append 2021 Test Table to live inside another database. The appended table is set to update the table in my main database when run, but I'm not sure how to write that into the VBA. Also, and this is more of a bonus question but I'd like to include it in my macro if possible, is there a way to remove all of the notifications of deleting and appending queries using VBA? I'm still relatively new to VBA, and am self taught so please bear with me. Thank you!
VBA Code:
Function Test1()
DoCmd.OpenQuery "Delete Test Table", acViewNormal, acEdit
DoCmd.OpenQuery "Date Range", acViewNormal, acEdit
DoCmd.OpenQuery "Append 2021 Test Table", acViewNormal, acEdit
DoCmd.OpenQuery "Test Query", acViewNormal, acEdit
Exit Function
End Function