SO, I am on the uphill side of this learning curve, and its hard going. I have a simple db, that askes the user to populate a form, and then, when he’s convinced its the data he needs, he clicks the submit button. So, I used forums and tutorials, and I have a bit of code… but it glitches every time, syntax error, and the “can’t find macro” error which is really confusing because I am not using a macro. Here is the code I am trying to use in the ON-CLICK event Procedure of the submit button.
Private Sub Command49_Click()
Dim strSQL As String
strSQL = _
“INSERT INTO tblTheGoods ” & _
“(Record Number, [Stock Number], [Color], Year, [Make], ” & _
“[Model], Date, Car Cost, [Bought From], Vin last6, ” & _
“[Period], [Buyer], Trans_Cost, Buyer Fee, Total Avg)” & _
” VALUES (” & _
Me.tboRecordNumber & “, ” & _
“‘” & Me.tboStockNumber & “‘, ” & _
“‘” & Me.cboColor & “‘, ” & _
Me.cboYear & “, ” & _
“‘” & Me.cboCarMake & “‘, ” & _
“‘” & Me.cboCarModel & “‘, ” & _
Format(Me.tboTodaydate, “#mm/dd/yyyy#”) & “, ” & _
Me.tboCarCost & “, ” & _
“‘” & Me.cboSeller & “‘, ” & _
“‘” & tboVin & “‘, ” & _
“‘” & Me.cboPeriod & “‘, ” & _
“‘” & Me.cboBuyer & “‘, ” & _
Me.tboTransportationCost & “, ” & _
Me.cboBuyerFee & “, ” & _
Me.tboTotalAverage & “)”
CurrentDb.Execute strSQL, dbFailOnError
End Sub
———————————————————
I see I can attatch files here.. Here is the program. Any guidance would be appreciated. Thank you .