I have a form with a query applied to it, i am looping for the records brought back, but i also need to loop through some more sql, when a condition is hit in the first loop.
Depends really, what are you looping the second resultset for? Are you looking for a value (in which case a second recordset is unnecessary) or are you performing some action based on the values in the second resultset?
HarleyQuinn
---------------------------------
Carter, hand me my thinking grenades!
You can hang outside in the sun all day tossing a ball around, or you can sit at your computer and do something that matters. - Eric Cartman
Get the most out of Tek-Tips, read FAQ222-2244: How to get the best answers before posting.
I am looping the first set for get email attachments, but if a value in the first loop = x, then i need to query that against another table, to create even more attachments for an email
If that makes sense.
I was thinking a 2nd recordset would be best.. but unsure if there was another way.
If the second query is returning multiple results that you need (i.e. you will need more than one value from more than one row) then I would agree that a second recordset would be my choice of route.
Cheers
HarleyQuinn
---------------------------------
Carter, hand me my thinking grenades!
You can hang outside in the sun all day tossing a ball around, or you can sit at your computer and do something that matters. - Eric Cartman
Get the most out of Tek-Tips, read FAQ222-2244: How to get the best answers before posting.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.