Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2002
    Location
    London
    Posts
    3

    Question Unanswered: Problem opening a recordset

    I've got a button on a form which I want to make open the query underlying the form, so I can do operations on each row. This is the code:

    Private Sub cmdTest_Click()
    Dim DB As Database
    Dim rst As Recordset
    Set DB = CurrentDb

    Set rst = DB.OpenRecordset("qryCurrentContacts", dbOpenDynaset)

    End Sub

    The "Set rst ..."line produces run time error 3061, too few parameters, expected 1.

    Does anyone know what i've done wrong?
    Thank you

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    This can happen if your query is expecting parameters that you are not setting.

  3. #3
    Join Date
    Sep 2002
    Location
    London
    Posts
    3

    Smile

    Many thanks for your help rnealejr.

  4. #4
    Join Date
    Feb 2002
    Posts
    2,232
    Did this address your issue ?

  5. #5
    Join Date
    Sep 2002
    Location
    London
    Posts
    3

    Smile

    Yes thank you, that sorted it out.

Posting Permissions

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