Results 1 to 2 of 2

Thread: FindFirst produces error

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Location
    Antrim
    Posts
    80

    Unhappy

    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.

  2. #2
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    Hi Rob Brown,

    Do you open the recordset before you use the FindFirst method?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width