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

Run-time Error 3075

Status
Not open for further replies.

CrAzIcRaCkEr

IS-IT--Management
Jul 18, 2006
3
US
Anybody see anything wrong with this SQL?

(Both dummyBLID and Me.BLID.Value variables are integers.)


DoCmd.RunSQL ("INSERT INTO tblApplications (BLID, appName, VRM, CISOcomments, SOX, lastRiskAssess, busImpact, GLBAHigh, catID, ISOquarterly, authorizer, administrator) SELECT " & dummyBLID & ", appName, VRM, CISOcomments, SOX, lastRiskAssess, busImpact, GLBAHigh, catID, ISOquarterly, authorizer, administrator WHERE BLID = " & Me.BLID.Value & ";")

This query should be taking certain recordsets that match the Me.BLID.Value and make a complete duplicate except for one variable...it should replace the BLID field with the dummyBLID variable.

Thanks In Advance!

Cc
 
Yes I see something wrong with it.

You are sticking a number in without aliasing it... Access thinks it is a field name.


DoCmd.RunSQL ("INSERT INTO tblApplications (BLID, appName, VRM, CISOcomments, SOX, lastRiskAssess, busImpact, GLBAHigh, catID, ISOquarterly, authorizer, administrator) SELECT " & dummyBLID & " As DummyBlid, appName, VRM, CISOcomments, SOX, lastRiskAssess, busImpact, GLBAHigh, catID, ISOquarterly, authorizer, administrator WHERE BLID = " & Me.BLID.Value & ";")

Note the " As DummyBlid" I added. And don't forget the space!
 
You use a SELECT instruction without a FROM clause ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Yes, I did need to add the FROM clause. I was thinking that it would default to current table as selection.

Thanks!

Cc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top