I get an object required error when working with rstSubjectList from cmdAdd_Click. When I go to tracking mode from the command button, it says rstSubjectList = Nothing. It seems that the recordset is not being carried accross from the form_load, despite the two events being local to each other (they are in the same form). Please tell me how I can fix this error.

VB Code:
  1. Private Sub Form_Load()
  2. Dim rstSubjectList As Recordset
  3.  
  4.  
  5. Set rstSubjectList = db.OpenRecordset("SELECT Subject FROM Subjects ORDER BY Subject")
  6. rstSubjectList.MoveFirst
  7.     Do While Not rstSubjectList.EOF
  8.         cboSubject.AddItem (rstSubjectList.Fields("Subject").Value)
  9.         rstSubjectList.MoveNext
  10.     Loop
  11.  
  12. End Sub
  13.  
  14. Private Sub cmdAdd_Click()
  15. With rstSubjectList 'Add subject if it doesn't already exist
  16.     .FindFirst "Subject ='" & cboSubject.Text & "'"
  17.     If .NoMatch = True Then
  18.         .AddNew
  19.         .Fields("Subject").Value = cboSubject.Text
  20.         .Update
  21.     End If
  22. End With