WindowsXP, Access 2003, novice user.
I have an unbound form.
I've written my code as follows:
Private Sub txtUniqueName_AfterUpdate()
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("hstUser")
rst.FindFirst "[UniqueName] = " & Me.txtUniqueName
If rst.NoMatch Then
MsgBox "No match found on file", vbOKOnly
MsgBox "Unique Name already on file", vbOKOnly
Set rst = Nothing
My problem is when I tab out of the text box I get the error msg
RUNTIME ERROR 3251 OPERATION IS NOT SUPPORTED FOR THIS TYPE OF OBJECT
rst.FindFirst "[UniqueName] = " & Me.txtUniqueName is highlighted when i click on debug.
I do not know if I am getting this error because my form is unbound and maybe after_update is not the appropriate event or if there is something else I am doing wrong.
Thanks in advance for assistance.