Help with Docmd.RunSql Please

  • Thread starter Thread starter Shadow
  • Start date Start date
S

Shadow

How can I create a UNION query with DoCmd.RunSql statement in VBA?

this doesn't work for me.

PerRst = "SELECT * FROM tblInOutDoc UNION SELECT * FROM tblTempInOutDoc;"
DoCmd.RunSQL PerRst



thanks for any kind of advice/
 
RunSQL is for action queries.

If you want to examine the results programmatically, use OpenRecordset().
If you want to view the results on screen, use OpenQuery.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top