Do..Until causing an If error

M

mjj4golf

I have a button connected to some code. Within the code is the following...

If <expr> Then
<stmnt>
Else
Do Until <table>.EOF
statments
Exit Do
End If

I get a compile error: End If w/o block If

Any ideas?

Mike
 
T

Tom Lake

mjj4golf said:
I have a button connected to some code. Within the code is the
following...

If <expr> Then
<stmnt>
Else
Do Until <table>.EOF
statments
Loop
End If

I get a compile error: End If w/o block If

Any ideas?

See above. To end a DO you need LOOP.

Tom Lake
 
Top