I am working on a form where schedulers can pre-register staff into upcoming classes. I keep coming up with the error message 461 with the code I have so far. What am I missing?
Private Sub Add1030()
'Code to add a record to T-Class Attendance if the scheduler chooses the 10:30AM class.
'New record must contain a StaffID, an EventID and an attendance status of false for pre-registered status.
Dim db As Database
Dim Rec As DAO.Recordset
Set db = CurrentDb()
Set Rec = db.OpenRecordset("T-Class Attendance", dbOpenDynaset)
Rec.AddNew
Rec.StaffID = Me!cmbStaff
Rec.EventID = Me!txtthis1030Event
Rec.Attended = False
Rec.Update
Rec.Close
End Sub
Private Sub Add1030()
'Code to add a record to T-Class Attendance if the scheduler chooses the 10:30AM class.
'New record must contain a StaffID, an EventID and an attendance status of false for pre-registered status.
Dim db As Database
Dim Rec As DAO.Recordset
Set db = CurrentDb()
Set Rec = db.OpenRecordset("T-Class Attendance", dbOpenDynaset)
Rec.AddNew
Rec.StaffID = Me!cmbStaff
Rec.EventID = Me!txtthis1030Event
Rec.Attended = False
Rec.Update
Rec.Close
End Sub