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

syntax error in INSERT INTO

Status
Not open for further replies.

handlebarry

Technical User
Dec 21, 2004
118
GB
Hi there - I have a SQL statement wich is giving the error message:

Syntax error (comma) in query expression '(GIS_Property_code, Property_Address)'

Statement:
DoCmd.RunSQL "INSERT INTO tblContractsToProperties (GIS_Property_code, Property_Address) SELECT (GIS_Property_Code, Property_Address) FROM tblproperties WHERE tblproperties.check = True"

before I added the extra field Property_Address this was working fine

Can someone please advise as everywhere I check this seems to be the correct method

PS first field is a number second is text
 
DoCmd.RunSQL "INSERT INTO tblContractsToProperties (GIS_Property_code, Property_Address) SELECT GIS_Property_Code, Property_Address FROM tblproperties WHERE check = True"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top