Hi.

I am building a VB5 front end for an Access 97 database. I am using the following code to find the current user (placed in a public string at logon) in a table in the database.

Private Sub Form_Load()

Dim strFind As String

strFind = "Username = '" & frmLogon.strCurrentUser & "'"

dtaChangePassword.Recordset.FindFirst strFind

End Sub

At run-time it produces the following error:

Object variable or with block variable not set.

Does anyone know what I am doing wrong?

Any help would be much appreciated.

Best Regards,

Rob Brown.