Talia Young
New member
- Local time
- Today, 18:54
- Joined
- Apr 19, 2002
- Messages
- 6
I'm having trouble compiling a "Do While..." loop. I've tried to simplify the code as much as possible.
Do While (True)
'do a lot of stuff
If (strCurrentRecord = strLastRecord) Then Exit Do
Loop
When I compile the code, I get a "Loop without Do" error at the Loop.
At first, I was using "While...Wend," but I changed that. Then I thought maybe I should be using "Exit While" instead of Loop, but I get a syntax error with that.
So I'm not sure what I'm doing wrong. Any help would be greatly appreciated.
Do While (True)
'do a lot of stuff
If (strCurrentRecord = strLastRecord) Then Exit Do
Loop
When I compile the code, I get a "Loop without Do" error at the Loop.
At first, I was using "While...Wend," but I changed that. Then I thought maybe I should be using "Exit While" instead of Loop, but I get a syntax error with that.
So I'm not sure what I'm doing wrong. Any help would be greatly appreciated.