F
FALSE_EMAIL
Can anybody help
I'm trying to transfer certain fields to a second table off a form, but I'm
having some trouble,
I want it to work on a button press but ask you for a serial number, I've
tried declaring it as a string and using an input box
but can't get the SQL code right. Can anybody help
currently it transfers everything but enters ' & vin & ' as the Vin and
not the value you type in the input box
Dim vin As String
Dim Date_time As Date
Date_time = Now()
vin = InputBox("Enter VIN")
Dim strSQL As String
Set db = CurrentDb()
strSQL = "INSERT INTO Vin_detail_tbl" & _
" (Vin_Num,Comp_id, Fault_id,Insp_point_id,Date_time,Shift)" & _
" VALUES (""& vin & ""," & _
Me.Component & "," & _
Me.Fault & "," & _
Me.Insp_point & ",#" & _
Date_time & "#," & _
Me.Shift & ");"
db.Execute strSQL, dbFailOnError
Kev
I'm trying to transfer certain fields to a second table off a form, but I'm
having some trouble,
I want it to work on a button press but ask you for a serial number, I've
tried declaring it as a string and using an input box
but can't get the SQL code right. Can anybody help
currently it transfers everything but enters ' & vin & ' as the Vin and
not the value you type in the input box
Dim vin As String
Dim Date_time As Date
Date_time = Now()
vin = InputBox("Enter VIN")
Dim strSQL As String
Set db = CurrentDb()
strSQL = "INSERT INTO Vin_detail_tbl" & _
" (Vin_Num,Comp_id, Fault_id,Insp_point_id,Date_time,Shift)" & _
" VALUES (""& vin & ""," & _
Me.Component & "," & _
Me.Fault & "," & _
Me.Insp_point & ",#" & _
Date_time & "#," & _
Me.Shift & ");"
db.Execute strSQL, dbFailOnError
Kev