It isn't in scope I'm afraid, it is currently limited to the sub Search_Click. To fix this, move the declaration line to General Declarations (the same place as the declaration of oConn etc.), and move the following two lines from Search_Click to Form_Unload:
VB Code:
  1. rst.Close
  2.     Set rst = Nothing
You should also add these lines to Form_Unload (after the two lines above):
VB Code:
  1. oConn.Close
  2.     Set oConn = Nothing

You should probably also remove the following section from AddUser, as it closes the recordset after adding a new record.
VB Code:
  1. If rst.State <> adStateClosed Then
  2.         On Error Resume Next
  3.         rst.Close
  4.     End If