R
rekibmtn
Hi all,
I have the following code that is updating a SQL database table from Access
(linked application to SQL). The following lines of code work fine as long as
all the Access fields are numeric. If I try to use a text field, I get an
invalid number of paramaters error. I know it is just the syntax for text
fields - think I am missing some ' or "....Any help is greatly appreciated.
Dim strSql As String
strSql = "INSERT INTO VIS_TRANS_AUDIT(PART_ID,QUANTITY,ROLL_NO,MSF,L_FEET,
COMMENTS) SELECT " & Forms![PolyexeProcess]![PartID] & ", " & Forms!
[PolyexeProcess]![RollAWeight] & ", " & Forms![PolyexeProcess]![PolyexeID] &
", " & Forms![PolyexeProcess]![CalcMsfRollA] & ", " & Forms![PolyexeProcess]!
[RollALength] & ", " & Forms![PolyexeProcess]![MEMO] & ";"
DBEngine(0)(0).Execute strSql, dbFailOnError
I have the following code that is updating a SQL database table from Access
(linked application to SQL). The following lines of code work fine as long as
all the Access fields are numeric. If I try to use a text field, I get an
invalid number of paramaters error. I know it is just the syntax for text
fields - think I am missing some ' or "....Any help is greatly appreciated.
Dim strSql As String
strSql = "INSERT INTO VIS_TRANS_AUDIT(PART_ID,QUANTITY,ROLL_NO,MSF,L_FEET,
COMMENTS) SELECT " & Forms![PolyexeProcess]![PartID] & ", " & Forms!
[PolyexeProcess]![RollAWeight] & ", " & Forms![PolyexeProcess]![PolyexeID] &
", " & Forms![PolyexeProcess]![CalcMsfRollA] & ", " & Forms![PolyexeProcess]!
[RollALength] & ", " & Forms![PolyexeProcess]![MEMO] & ";"
DBEngine(0)(0).Execute strSql, dbFailOnError