I am trying to insert into a Table named SDetails. I inherited this system, the Tables are a bit ugly,
The Fields in this Table are
ResNum - number
SSNumber - number
NumA - number
NumC - number
SCost - currency
SSCommission - currency
Adult_Cost - currency
Child_Cost - cirrency
EventDate - date/time
EventTime - text
Confirmed_By - text
Confirmed_Date - date/time
Confo_# - text
SSLean_Name - text
SCancel - Yes/no
SPaid - Yes/No
SPayDate - date/time
SNet - currency
SInvoice# - text
GCarrier - text
GInflight# - text
GArrivaldate - date/time
GArrivalTime - text
GOutflight# - text
GDepartDate - date/time
GDepartTime - text
GPickup - text
GDropoff - text
Adult_Net - currency
Child_Net - currency
Segnum - number
VendorID - number
NumStudents - number
NumSeniors - number
Senior_Cost - currency
Senior_Net - currency
Student_Cost - currency
Student_Net - currency
Status - number
There are no constraints, and I receive no error messages. I can step thru the code in debug mode and all of the statements execute.
Here is my code
If rsEventSegments.EOF = False Then
With rsEventSegments
.MoveFirst
Do While Not .EOF
sql = "INSERT INTO SDetails (ResNum, SSNumber, NumA, NumC, NumStudents, SCost, Adult_Cost, Child_Cost, " & _
"Student_Cost, EventDate, SSLead_Name, VendorID, Status, CorrectEventDate, SNet, Adult_Net, " & _
"Child_Net, Student_Net) " & _
"VALUES(" & Me.ResNum & ", " & .Fields("SSNumber") & ", " & .Fields("NumA") & "," & .Fields("NumC") & "," & _
.Fields("NumStudents") & "," & .Fields("SCost") & "," & .Fields("Adult_Cost") & "," & _
.Fields("Child_Cost") & "," & .Fields("Student_Cost") & "," & .Fields("EventDate") & ",'" & _
Me.ResClientFirst & " " & Me.ResClientLast & "'," & .Fields("VendorID") & "," & _
1 & "," & 1 & "," & .Fields("SNet") & "," & .Fields("Adult_Net") & "," & .Fields("Child_Net") & _
"," & .Fields("Student_Net") & ")"
CurrentDb.Execute sql
.MoveNext
Loop
End With