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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DoCmd.RUNSQL Insert 1

Status
Not open for further replies.

cranebill

IS-IT--Management
Jan 4, 2002
1,113
US
DoCmd.RunSQL "INSERT INTO Task_list_History (Select * from Task_list)"

I have this in an on click event. The tables are based on ODBC connection and I tested the actual SQL itself in Oracle and the syntax is correct.

Is there something I am missing?
 
And the problem is ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Oops...

In access it does not run... so I tried the SQL statement itself in Oracle to make sure it was not a syntax error. In Access it gets an error... #307 I believe.
 
307 is not a valid error number ...
Anyway, for me, the corect syntax is:
DoCmd.RunSQL "INSERT INTO Task_list_History SELECT * FROM Task_list"
provided that Task_list_History and Task_list have the exact same structure.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks, guess the parenthesis threw it off.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top