Results 1 to 2 of 2

Thread: Access Query run in VB6

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 1999
    Location
    Hongkong
    Posts
    7

    Post

    Hi there again


    I have the following code in my VB6. I try to run the query from the Access97 in VB6....there my code.

    Dim dbCurrent As Database
    Dim rstcurrent As Recordset
    ' Open a database
    Set dbCurrent = OpenDatabase("C:\dbase\SUPPLIER.mdb")
    'open the query or table
    Set rstcurrent = dbCurrent.OpenRecordset("SUPPLIER QUERY")

    But a Run-Time error '3061' occur say" Too few parmeters, Expected 1"

    What setting did I miss?

    Please advice
    Thank you

    Sheley

  2. #2

    Post

    You didn't tell what your query is, most probably you mistyped something in your query, I had the same problem with my query and it was the "'" usage, if you use them in your query as a field name delimeter try substituting them with square brackets.

    Wesam

    ------------------

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