B
bob
When I am running these code it is giving me an error on
the db.execute line saying"
runtime error 3070. The Microsoft jet engine does not
recognise '00040' as a valid field name or expression"
can someone help?
Private Sub Command46_Click()
'below is ken's code.above is the test code to insert a
record in to the tbl attendance
Dim db As Database
Dim rs As Recordset
Dim strsQl As String
Set rs = Me.RecordsetClone
Set db = CurrentDb
rs.MoveFirst
Do Until rs.EOF
strsQl = _
"Insert into tblattendance(" & _
StudentClockNum & ") values(" & _
rs.Fields("StudentClockNum") & ");"
db.Execute strsQl 'dbFailOnError
rs.MoveNext
Loop
Set rs = Nothing
Set db = Nothing
End Sub
the db.execute line saying"
runtime error 3070. The Microsoft jet engine does not
recognise '00040' as a valid field name or expression"
can someone help?
Private Sub Command46_Click()
'below is ken's code.above is the test code to insert a
record in to the tbl attendance
Dim db As Database
Dim rs As Recordset
Dim strsQl As String
Set rs = Me.RecordsetClone
Set db = CurrentDb
rs.MoveFirst
Do Until rs.EOF
strsQl = _
"Insert into tblattendance(" & _
StudentClockNum & ") values(" & _
rs.Fields("StudentClockNum") & ");"
db.Execute strsQl 'dbFailOnError
rs.MoveNext
Loop
Set rs = Nothing
Set db = Nothing
End Sub