Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error 3061 - To Few Parameters

Status
Not open for further replies.

mharroff

MIS
Nov 17, 2000
75
US
HELP!

Whenever I try to run the code below I keep getting Error 3061 - To Few Parameters when it gets to the set rst line.

I have checked the Access Help and it appears that it should work.
Code:
  Dim strSQL As String
  Dim db As Database
  Dim rst As Recordset
  
  Set db = CurrentDb
  strSQL = "SELECT SumProd FROM qsumCScrap WHERE ProdDept = 'S'"
  Set rst = db.OpenRecordset(strSQL)

TIA
 
The other parameters are supposed to be optional. If you include the type argument does it work? JHall
 
No that probably won't fix it. I don't know, it works okay on my end. JHall
 
What version of DAO are you using?
You might try dimensioning your objects in the general declarations section as DAO.Database and DAO.Recordset respectively. JHall
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top