W
Winger
I'm having problems with Nesting loops and wonder if there is something I
should know. I hav'ent programmed for 20 years and am trying to get back into
it with an Access VBA project.
In summary:-
While not RecordSet1.EOF
(Do Code)
While not RecordSet2.EOF
(Do more code)
RecordSet2.MoveNext
Wend
(Do some code before exisiting
RecordSet1.MoveNext
Wend
I'm guessing that I can nest two "While" Loops?.
Should I "mix and match" i.e. nest a Do loop around a While Loop?
The problem is I either get the results I require, or I get an error message
"Either BOF or EOF is true, or the record has been deleted".
I know the record hasn't been deleted - how to I check that BOF or EOF isn't
true before I exectute my code?
Any pointers greatly received.
should know. I hav'ent programmed for 20 years and am trying to get back into
it with an Access VBA project.
In summary:-
While not RecordSet1.EOF
(Do Code)
While not RecordSet2.EOF
(Do more code)
RecordSet2.MoveNext
Wend
(Do some code before exisiting
RecordSet1.MoveNext
Wend
I'm guessing that I can nest two "While" Loops?.
Should I "mix and match" i.e. nest a Do loop around a While Loop?
The problem is I either get the results I require, or I get an error message
"Either BOF or EOF is true, or the record has been deleted".
I know the record hasn't been deleted - how to I check that BOF or EOF isn't
true before I exectute my code?
Any pointers greatly received.