Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21271

Retrieving a recordset based on a combo box selection

$
0
0
I have a user select from a combo box that was populated from an Access database.
I then want to call the rest of the recordset but my seek function will not work like I remember.

Here is what I am working with:
Code:


datRoute.recordset.index = "PrimaryKey"
datRoute.recordset.seek "=", combo1.text

I get this error in debug mode:

"Run-Time error '3251':
Operation is not supported for this type of object."
When I click Debug, it highlights this in yellow:
Code:

datRoute.Recordset.Index = "PrimaryKey"
My data control(datRoute) is set to dynaset

I remember being able to pull a recordset using a text box and then using the seek function
I cant seem remember how to do this part.

Any help would be greatly appreciated.

Viewing all articles
Browse latest Browse all 21271

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>