runtime error 3134 access

DBrivera
DBrivera used Ask the Experts™
on
I am doing a simple Sql Query and I am getting the runtime error 3134.  I have a similar query working in the database with other tables.  all the fields are the same field lenth and have the same atributes.  

Here is the query for any one to help.

vate Sub Command76_Click()
Dim strSQL As String



 strSQL = "INSERT INTO [Non-Stock] ( Item-Description, 2_description, UOM-Mult, K2, Unit-Cost, Manf-Number, Manf-Code, Unit-Cost-UOM, K_Mesure, Lawson-Item-Nbr) SELECT [User Table].Description, [User Table].[2nd Description], [User Table].K1, [User Table].K2, [User Table].Price, [User Table].Product_Num, [User Table].Manufacturer, [User Table].A_measure, [User Table].K_measure, [User Table].Client_Num FROM [User Table] Where Client_Num is null "



 
DoCmd.SetWarnings False
DoCmd.RunSQL strSQL
DoCmd.SetWarnings True
End Sub
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
I think you should put field that have '-' in []

For ex: [Item-Description]
Scott McDaniel (EE MVE )Infotrakker Software
Most Valuable Expert 2012
Top Expert 2014
Commented:
Matter of fact, it's not a bad idea to enclose ALL field declarations in square brackets, as trungk43 suggests. This clears up a lot of confusion on the part of the VBA parser, and makes sure your fields are declared correctly.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial