Append Query Help.

Nothingness

New member
Local time
Today, 10:52
Joined
Feb 7, 2007
Messages
3
Hello,
I've searched and read quite a few forum posts on how to append one query to another. I originally had a macro that I created which would open the Make Table Query and then open the Append Queries. I want to convert this to VBA and make it so I do not get those execute pop ups telling me how many rows were added. Any help would be greatly appreciated.

Below is the code that was created when I clicked the "Covernt Macros to Visual Basic" button:

Function Appending_Macro()
On Error GoTo Appending_Macro_Err
DoCmd.OpenQuery "200609 Append", acViewNormal, acEdit
DoCmd.OpenQuery "200610 Append", acViewNormal, acEdit
Appending_Macro_Exit:
Exit Function

Thank you again.
 
If all you need is to make the messages go away then all you need to do is a setwarnings off. You can do this within a marco or with code...:)
 
Thanks for the fast response! I've tried this but the one thing that I find discouraging about it is that I have no way of telling whether it was performed successfully--other than looking in the Table that was created and that is quite tedious.

I guess the better question would be, is there a command that tells me if all the records were successfully added?

I hate those warnings but they are nice because I know how many records were appended at least.

Thanks again.
 
I find that simply displaying a message box saying the task is complete works well. :)
 
you need to structure your procedure differently.

Procedure sum test()
on error goto Err_Handler

your code here

Exit_Handler:
'Clean up code here
Exit Sub

Err_Handler:
msgbox err & " " & err.Description
resume Exit_Handler
end sub

using this technique allows you set warning off but if an error occurs then the number and message will always be displayed.
 
You could turn it off manually

Hi

You could turn the reporting off manually:-

Click Tools
Click Options
Click Edit/Find Tab
Remove the tick from Action Queries

and that will suppress the annoying action query reports.

Regards

Tony
 

Users who are viewing this thread

Back
Top Bottom