T
tracktraining
Hi All,
I am getting the 3134 Error message (Syntax error in INSERT INTO statement.)
and I would like to know how to resolve it. Please help.
Background information:
There is a yes/no box (trainreq). When the user enters the form, I want
TrainReq to default to True (i.e. the check box is checked). Thus, all the
boxes that were unchecked before (the last time the form was closed) should
be checked when the form open again.
Private Sub Form_Open(Cancel As Integer)
Dim db As Database
Dim rs As DAO.Recordset
Dim UpdateTrainReq As String
Set db = CurrentDb
Set rs = Me.RecordsetClone
rs.MoveFirst
'check the trainreq if box is uncheck (start all boxes off with true and
let the user uncheck the box)
'user don't check box, user only uncheck box
Do Until rs.EOF
MsgBox "Do Until"
If Not rs!TrainReq = True Then
MsgBox "Loop"
UpdateTrainReq = " Insert into EmpDocStatus ( TrainReq ) Value
('True')"
db.Execute (UpdateTrainReq)
End If
rs.MoveNext
Loop
End Sub
Thank you,
Tracktraining
I am getting the 3134 Error message (Syntax error in INSERT INTO statement.)
and I would like to know how to resolve it. Please help.
Background information:
There is a yes/no box (trainreq). When the user enters the form, I want
TrainReq to default to True (i.e. the check box is checked). Thus, all the
boxes that were unchecked before (the last time the form was closed) should
be checked when the form open again.
Private Sub Form_Open(Cancel As Integer)
Dim db As Database
Dim rs As DAO.Recordset
Dim UpdateTrainReq As String
Set db = CurrentDb
Set rs = Me.RecordsetClone
rs.MoveFirst
'check the trainreq if box is uncheck (start all boxes off with true and
let the user uncheck the box)
'user don't check box, user only uncheck box
Do Until rs.EOF
MsgBox "Do Until"
If Not rs!TrainReq = True Then
MsgBox "Loop"
UpdateTrainReq = " Insert into EmpDocStatus ( TrainReq ) Value
('True')"
db.Execute (UpdateTrainReq)
End If
rs.MoveNext
Loop
End Sub
Thank you,
Tracktraining