F
FALSE_EMAIL
Hi
I've got a form which I'm using to track defects numbers & would like to
track the defects via the sieral number as well in a seperate table, so I
have tried this code but can't get it to work. the fields types are
Vin_Num = Text
Comp_id = number
Fault_id = number
Insp_point_id = Number
Date_time = Date
Shift = Number
kev
-----------------------------------------------------------
Dim vinnumber As String
Dim Date_time As Date
Date_time = Now()
vinnumber = InputBox("Enter Vin Number")
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 (" & vinnumber & "," & _
Me.Component & "," & _
Me.Fault & "," & _
Me.Insp_point & ",#" & _
Date_time & "#," & _
Me.Shift & ");"
db.Execute strSQL, dbFailOnError
I've got a form which I'm using to track defects numbers & would like to
track the defects via the sieral number as well in a seperate table, so I
have tried this code but can't get it to work. the fields types are
Vin_Num = Text
Comp_id = number
Fault_id = number
Insp_point_id = Number
Date_time = Date
Shift = Number
kev
-----------------------------------------------------------
Dim vinnumber As String
Dim Date_time As Date
Date_time = Now()
vinnumber = InputBox("Enter Vin Number")
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 (" & vinnumber & "," & _
Me.Component & "," & _
Me.Fault & "," & _
Me.Insp_point & ",#" & _
Date_time & "#," & _
Me.Shift & ");"
db.Execute strSQL, dbFailOnError