End the Wend

captnk

Registered User.
Local time
Today, 20:04
Joined
Dec 12, 2001
Messages
148
I am running the following simple bit of code
"Private Sub Command70_Click()
While "tauto" <> ""
DoCmd.RunMacro "tauto2"
Wend
End Sub

A query strips off the "first" table item on each loop,until nothing is left in the table.
Tablename=Tauto.
It loops perfectly,and processes each entry,BUT doesnt stop when the table reaches nil.
Any suggestions,how I should adjust the while statement pls
 
Code:
While "tauto" <> ""

That line will loop forever as "tauto" is never going to equal ""
 
Yes ! I know it loops continuosly that why I posted.
I,m fresh out of ideas,and looking for some alternative suggestion
Tks
 
Wouldn't it better to loop through the table itself?

i.e.

While Not Me.EOF
 
Tks Mile-o-phile.
Good idea.Seems to work fine now

Captnk
 

Users who are viewing this thread

Back
Top Bottom