Append Query in Macro?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a very large database with a number of queries. One of the queries I
want to add to a Macro I have running.

Why does this append query not show in my query name selection under
OpenQuery?

Help!
 
Could you help a bit more with RunSQL? If I use the name of the append query
I get and error that says Unexpected result, should be INSERT, etc etc. Ok,
so if I view the query in SQL, I see that this is what the runSQL command is
expecting. However, if I copy the query in SQL I get another error saying
that it's too long to edit.

Thanks for educating me!
 
Hmm. So the 256 character limit makes this unsuitable.

You can do it in code with a much longer string, e.g.:
Dim strSql As String
strSql= "INSERT ...
DoCmd.RunSql strSql

Even better, in code you can use the Execute method so you know what
happened. Details
Action queries: suppressing dialogs, while knowing results
at:
http://allenbrowne.com/ser-60.html
 
Back
Top