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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looping through multiple recordsets on a form 1

Status
Not open for further replies.

JamieArvato

Technical User
Aug 5, 2004
50
GB
Hi

I have a form on which I can select titles from a combo box. The table from which I am retrieving this data is linked to two record sets on the form (whose data is drawn from a further 2 linked tables). These recordsets appear filtered on the form according to what is selected in the combo box. However, when I try to loop through one of the recordsets, it loops through every record in the source, rather than just those displayed, suggesting that it isn't actually filtered (ie the other records are just hidden). Can anybody suggest some code that will only loop through the selected records?

Thanks

Jackie
 

Your post is a bit hard to follow, but if you're looping through a recordset via code and you want it to be the same recordset that is displayed on your form, then look at how that recordset is created and filter your loop recordset with the same criteria. Hopefully I'm not misunderstanding you. If so, you'll have to be more clear and specific for us to better advise, but it sounds like you need to investigate the form recordsets in design view to know what filter is being used.

Hope this helps,

Mike Dorthick
 
Have you tried RecordsetClone ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top