F
FatMan
Hi all:
I have the following code in my program that is supposed to insert a record
in my table (tblContent) and replace the fields with the values stored in
varValues(). When I run the code my debug.print statements will show the
expected data yet the Insert Into Statement fails to add the record in table
and offers me no error message/code. I know the program gets by the
statement as I have added a temp msgbox to prompt me to check to see if
anything has happened. The odd thing is I have used the same statement with
a different table and fields and it works. All I did was copy, paste and
change the work code to reflect the change in the table and field names. All
the data being added in this case is "text", except the last two that are
long integers.
Can anyone offer any suggestions as to what might be happening?
Any and all help is greatly appreciated.
Thanks,
FatMan
'=====================
'Start of Code
'=====================
Debug.Print "Content Data"
Debug.Print varValues(0) & " = Variety"
Debug.Print varValues(1) & " = Size"
Debug.Print varValues(2) & " = Quality"
Debug.Print varValues(3) & " = Color"
Debug.Print varValues(4) & " = Blush"
Debug.Print varValues(5) & " = Length"
Debug.Print varValues(6) & " = Remark"
Debug.Print varValues(7) & " = Bar Code"
Debug.Print "intFillID: " & intFillID
Debug.Print "intfileid: " & intFileID
CurrentDb.Execute "INSERT INTO tblContent " & _
"(ConVariety, ConSize, ConQuality, ConColor, ConBlush,
ConLength,ConRemark, ConBarCode, ConFillingID, ConFileNameID) " & _
"VALUES (""" & Trim(varValues(0)) & """, """ & Trim(varValues(1)) & """,
""" & _
Trim(varValues(2)) & """, """ & Trim(varValues(3)) &
""", """ & varValues(4) & """, """ & _
Trim(varValues(5)) & """, """ & Trim(varValues(6)) &
""", """ & varValues(7) & """, " & _
intFillID & ", " & intFileID & " )"
MsgBox "Check it out."
I have the following code in my program that is supposed to insert a record
in my table (tblContent) and replace the fields with the values stored in
varValues(). When I run the code my debug.print statements will show the
expected data yet the Insert Into Statement fails to add the record in table
and offers me no error message/code. I know the program gets by the
statement as I have added a temp msgbox to prompt me to check to see if
anything has happened. The odd thing is I have used the same statement with
a different table and fields and it works. All I did was copy, paste and
change the work code to reflect the change in the table and field names. All
the data being added in this case is "text", except the last two that are
long integers.
Can anyone offer any suggestions as to what might be happening?
Any and all help is greatly appreciated.
Thanks,
FatMan
'=====================
'Start of Code
'=====================
Debug.Print "Content Data"
Debug.Print varValues(0) & " = Variety"
Debug.Print varValues(1) & " = Size"
Debug.Print varValues(2) & " = Quality"
Debug.Print varValues(3) & " = Color"
Debug.Print varValues(4) & " = Blush"
Debug.Print varValues(5) & " = Length"
Debug.Print varValues(6) & " = Remark"
Debug.Print varValues(7) & " = Bar Code"
Debug.Print "intFillID: " & intFillID
Debug.Print "intfileid: " & intFileID
CurrentDb.Execute "INSERT INTO tblContent " & _
"(ConVariety, ConSize, ConQuality, ConColor, ConBlush,
ConLength,ConRemark, ConBarCode, ConFillingID, ConFileNameID) " & _
"VALUES (""" & Trim(varValues(0)) & """, """ & Trim(varValues(1)) & """,
""" & _
Trim(varValues(2)) & """, """ & Trim(varValues(3)) &
""", """ & varValues(4) & """, """ & _
Trim(varValues(5)) & """, """ & Trim(varValues(6)) &
""", """ & varValues(7) & """, " & _
intFillID & ", " & intFileID & " )"
MsgBox "Check it out."