Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert into Linked table Query that won't excute in code

Status
Not open for further replies.

CJwater

IS-IT--Management
Mar 26, 2008
34
US
Hi!
I'm converting an app that had internal Access tables to SQL tables. I'm having a problem with an "Insert Into" query that inserts into a new SQL table.
I added public permissions on the table for everything. When I run the code in debug mode and leave the query open, I see the query results but it won't actually update the table unless I manually hit the red exclation mark inside the query window. Only then does SQL table get updated.
I have DoCmd.SetWarnings True but when I run the code (DoCmd.OpenQuery "qrya_SaveWorksheet")it does not ask me if I want to append the table. Is there a setting or command I'm missing to run a query on a linked table?

Thanks
CJ
 
Just in case someone else has the same problem...

I changed DoCmd.SetWarnings from "True" (I usually only use true for debugging) to "False" and it does executed the insert into the SQL table.



 
Don't forget to reset back to True after the code executes.

Ever notice how fast Windows runs? Me neither.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top