Parameters

kmrowlan

Board Regular
Joined
Aug 5, 2009
Messages
80
I am getting an message that says "Too few parameters, Expected 2 when I run the following expression.

Advise on what it is looking for that I am not supplying?

strColorTemp = "Special Color"
Set rst1 = dbs.OpenRecordset("SELECT Color.*, IIf([Color].[Color]=[" & strf1Color & "],[" & strf1Color & "],[" & strColorTemp & "]) AS Expr1 " & _
"FROM Color;")
strf1Colora = rst1![Expr1]

Thanks
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
It looks as if you may not have closed one of your Quote marks. I would check there. \

OR

It looks like you are using DAO (I am not familar with it but found this in my book):

FROM: Pages 1512/1513 of Microsoft Access 2010 Bible by Michael R Groh:
Set RecordSetObject = DatabaseObject.OpenRecordset(source,
[type], [options], [lockoptions])
RecordSetObject is a variable you have declared as DAO.Recordset, and DatabaseObject is a variable you have declared as DAO.Database

So you seem to be missing the Recordset Type.
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,740
Members
452,940
Latest member
Lawrenceiow

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top