Run time erro 3075 INSERT INTO SQL

I have a bunch of textboxes on my form which are not visible but are populated by my listboxes. I'm trying to INSERT INTO the values from the textboxes into my table. I'm keep getting this error 3075. Can you anyone take a loot at it. My fields are listed below:

STOCKING_LOCATION_NAME=txtNotAtLocation
PRODUCT_BARCODE=txtPN
PART_NUMBER=txtPartNumber
DESCRIPTION=txtDESCRIPTION
txtSTOCKUOM
STOCKING_QTY=txtSTOCKQTY
SELLING_UOM=txtSELLUOM
SellPrice=txtSELLPRICE
PrintCount=txtconversion

All are text except for txtSTOCKQTY, txtSELLPRICE, and txtCONVERSION. These are integers.

Here is what I have so far. Any help would be awesome.


   Dim strSQL As String
   
strSQL = "Insert Into tblProductLocation "
strSQL=strSQL& "(STOCKING_LOCATION_NAME,PRODUCT_BARCODE,PART_NUMBER,DESCRIPTION,STOCKING_UOM,STOCKING_QTY,SELLING_UOM,SellPrice,PrintCount)"
strSQL = strSQL & "Values ('" & txtNotAtLocation & ",'" & txtPN & "'" & txtPartNumber & "','" & txtDESCRIPTION & "' '" & txtSTOCKUOM & "'"
strSQL = strSQL & " , " & txtSTOCKQTY & ",'" & txtSELLUOM & "'," & txtSELLPRICE & "," & txtconversion & ")"
            DoCmd.RunSQL strSQL
            MsgBox strSQL
           

            Me.lstNotAtLocation.Requery
            Me.lstLocation.Requery
goingolfn99Asked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
strSQL = "Insert Into tblProductLocation "
strSQL=strSQL& "(STOCKING_LOCATION_NAME,PRODUCT_BARCODE,PART_NUMBER,DESCRIPTION,STOCKING_UOM,STOCKING_QTY,SELLING_UOM,SellPrice,PrintCount)"
strSQL = strSQL & "Values ('" & txtNotAtLocation & "','" & txtPN & "'" & txtPartNumber & "','" & txtDESCRIPTION & "', '" & txtSTOCKUOM & "'"
strSQL = strSQL & " , " & txtSTOCKQTY & ",'" & txtSELLUOM & "'," & txtSELLPRICE & "," & txtconversion & ")"
            MsgBox strSQL
            DoCmd.RunSQL strSQL

you had missing some quotes and a comma in the query.
0
 
goingolfn99Author Commented:
Kind of figured it out, but a quick 500 points for you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.