Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do ...
Message
 
To
14/02/1999 22:26:12
General information
Forum:
Visual Basic
Category:
Other
Title:
Re: Do ...
Miscellaneous
Thread ID:
00187577
Message ID:
00187724
Views:
19
>Actually .. this is a very simple problem .. but I don't understand why .. VB6 give me the error message "No current record" .. can anybody explain to me .. please .. the statement is below :
>
>
>
>Customer.MoveFirst
>With Customer
>Do
> mCustomerCode=!CustomerCode
> While NOT .EOF and mCustomerCode=!CustomerCode
> txtShow.Text = !CustomerCode
> .MoveNext
> Wend
>Loop Until .EOF
>.Close

Put the test condition at the beginning of the loop
With Customer
if not .eof then
.MoveFirst
Do Until .EOF
mCustomerCode=!CustomerCode
While NOT .EOF and mCustomerCode=!CustomerCode
txtShow.Text = !CustomerCode
.MoveNext
Wend
Loop
end if
.Close
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Reply
Map
View

Click here to load this message in the networking platform