S
spadasak via AccessMonster.com
I am getting a missing operator error when trying to print as per the code
below. The Cert_Rec.CustodyNumber & ") " variable was changed from a number
to text Cert_Rec.CustodyNumber & "') "and in doing so I get an error.
What am I missing??
cmd.CommandText = "INSERT INTO " & TableName & _
"(TKC, [Record Code], LodTag, " & _
"LIDt, LIWt, " & _
"Vend, [Truck Owner], " & _
"[Truck Make], " & _
"Pile, Specie, Miles, " & _
"[Town Name], State, County, Town, " & _
"[Inventory Code], Driver, BB, " & _
"[Trip Ticket], SupplierName, [CertCheck1], [CertCheck2], " &
_
"[CertCheck3], [CertCheck4], [CertCheck5], " & _
"[CertCheck6], [CertOther], Rate, Rate1, Rate2, Rate3,
CustodyNumber) " & _
"VALUES (" & _
NextTKC & ", '1', " & CurrentTag & _
", #" & TransDt & "#, " & ScaleInfo(CurrentScale).Weight & _
", '" & .VendorName & "', '" & .TruckOwner & _
"', '" & .TruckMake & "', '" & .Pile & "', '" & .Specie & "',
" & .mILEAGE & _
", '" & .Town & "', '" & .STATE & "', " & .County & _
", '" & TownNum & "', '" & .InventoryType & _
"', '" & Driver & "', " & .BBFlag & _
", '" & .TripTicketNum & "', '" & .Supplier & _
"', " & Cert_Rec.Checkbox(1) & ", " & Cert_Rec.Checkbox(2) &
_
", " & Cert_Rec.Checkbox(3) & ", " & Cert_Rec.Checkbox(4) & _
", " & Cert_Rec.Checkbox(5) & ", " & Cert_Rec.Checkbox(6) & _
", '" & Cert_Rec.OtherText & "'," & .Rate & "," & .Rate1 & _
"," & .Rate2 & "," & .Rate3 & ", " & Cert_Rec.CustodyNumber &
"') "
below. The Cert_Rec.CustodyNumber & ") " variable was changed from a number
to text Cert_Rec.CustodyNumber & "') "and in doing so I get an error.
What am I missing??
cmd.CommandText = "INSERT INTO " & TableName & _
"(TKC, [Record Code], LodTag, " & _
"LIDt, LIWt, " & _
"Vend, [Truck Owner], " & _
"[Truck Make], " & _
"Pile, Specie, Miles, " & _
"[Town Name], State, County, Town, " & _
"[Inventory Code], Driver, BB, " & _
"[Trip Ticket], SupplierName, [CertCheck1], [CertCheck2], " &
_
"[CertCheck3], [CertCheck4], [CertCheck5], " & _
"[CertCheck6], [CertOther], Rate, Rate1, Rate2, Rate3,
CustodyNumber) " & _
"VALUES (" & _
NextTKC & ", '1', " & CurrentTag & _
", #" & TransDt & "#, " & ScaleInfo(CurrentScale).Weight & _
", '" & .VendorName & "', '" & .TruckOwner & _
"', '" & .TruckMake & "', '" & .Pile & "', '" & .Specie & "',
" & .mILEAGE & _
", '" & .Town & "', '" & .STATE & "', " & .County & _
", '" & TownNum & "', '" & .InventoryType & _
"', '" & Driver & "', " & .BBFlag & _
", '" & .TripTicketNum & "', '" & .Supplier & _
"', " & Cert_Rec.Checkbox(1) & ", " & Cert_Rec.Checkbox(2) &
_
", " & Cert_Rec.Checkbox(3) & ", " & Cert_Rec.Checkbox(4) & _
", " & Cert_Rec.Checkbox(5) & ", " & Cert_Rec.Checkbox(6) & _
", '" & Cert_Rec.OtherText & "'," & .Rate & "," & .Rate1 & _
"," & .Rate2 & "," & .Rate3 & ", " & Cert_Rec.CustodyNumber &
"') "