PDA

Click to See Complete Forum and Search --> : Access Query run in VB6


Sheley
Jul 20th, 1999, 11:20 AM
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

Wesam
Jul 20th, 1999, 01:32 PM
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

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