Item not found in this Collection

kmrowlan

Board Regular
Joined
Aug 5, 2009
Messages
80
I am getting this debug message when I try to capture the recordset on some of the data from the table. I get the information if the data is a number, but not if it is in another format - ie text or other.

What do I need to do to fix this?

Example code is:
strCLS1 = rst![Buyout_CLS1]
strPartNo = rst![Buyout_PartNo]
strClass = rst![Buyout_Class]
strDescription = rst![Buyout_Description]
strImage = rst![Buyout_Image]
sinPrice = rst![Buyout_Price]

Buyout_PartNo and Buyout_Price come thru - they are numbers.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Are you sure you the field names are correct?

No trailing/leading spaces anywhere?

That's far more likely to be the problem, I can't actually see the data type being the cause.
 
Upvote 0
I can't actually see the data type being the cause.
That is completely correct. The error "Item not found in this collection" means that you are referring to a field and Access can't find it. So it is either being referred to incorrectly or the field wasn't included in the SQL Statement that the recordset is based on.
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,828
Members
452,946
Latest member
JoseDavid

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