R
Rass
I can supply all coding if necessary:
I want to call a "do until rst.eof" that is in another
private sub named "CallUS"
The loop works fine if I keep it in the same sub routine
as the rst.open etc, and just don't do the call. I must
do the call, since I change all of the search parameters
for every record and I don't want to duplicate the do loop
for every one of 150 searches. I just want to change the
parameters and let the loop do the work in another sub.
When I put the "do until" routine (direct copy) and place
a call for it in the main sub, it will call the proper
routine. Using F8 I step through each line of coding and
when I get to the "do until rst.eof" I get an error that
an object is required.
Why can't I run the do loop in a seperate sub and still
access my record set?
Thanks for helping!
I want to call a "do until rst.eof" that is in another
private sub named "CallUS"
The loop works fine if I keep it in the same sub routine
as the rst.open etc, and just don't do the call. I must
do the call, since I change all of the search parameters
for every record and I don't want to duplicate the do loop
for every one of 150 searches. I just want to change the
parameters and let the loop do the work in another sub.
When I put the "do until" routine (direct copy) and place
a call for it in the main sub, it will call the proper
routine. Using F8 I step through each line of coding and
when I get to the "do until rst.eof" I get an error that
an object is required.
Why can't I run the do loop in a seperate sub and still
access my record set?
Thanks for helping!