|
-
Jun 26th, 2000, 08:35 PM
#1
Thread Starter
Lively Member
Here's the bummer:
Private Sub TraitementComplet()
OuvreTables
AcXref.MoveFirst
Do While Not AcXref.EOF
If Not LigneUtile(AcXref!Col001) Then
AcXref.MoveNext
Loop
End If
If InStr("File:", AcXref!Col001) > 0 Then
mNomDeTable = Trim(Mid(AcXref!Col001, 28, 10))
lblTable.Caption = mNomDeTable
If mTable <> mNomDeTable Then
mCompteur = 0
mTable = mNomDeTable
End If
AcXref.MoveNext
Loop
End If
ExtraitInfoLigne
Stats
Dictionnaire
XRef
AcXref.MoveNext
Loop
End Sub
I'm trying to loop within the Do While and the programs bombs out with an error saying that there is a missing do for my loop statement...
I'm sure this is a wrong way of doing it! What is the right way. I'm trying to go back to the beginning of the do while AcXref statement to continue processing...
Thanks in advance for your "always helpfull" help.
Sincerely, Patrice
-
Jun 26th, 2000, 08:37 PM
#2
Thread Starter
Lively Member
Why is it that my code was perfectly indented and now showing up all left justified !!! What a messy day...
Sorry for the spaghetti code... :-/
-
Jun 26th, 2000, 08:44 PM
#3
Fanatic Member
God what a mess. Hard to tell what you wanted, but this may be it.
You seemed to be using the keyword "Loop" far to many times. You can only have one "Loop" for Each "Do".
Code:
Private Sub TraitementComplet()
OuvreTables
AcXref.MoveFirst
Do While Not AcXref.EOF
If Not LigneUtile(AcXref!Col001) Then
AcXref.MoveNext
ElseIf InStr("File:", AcXref!Col001) > 0 Then
mNomDeTable = Trim(Mid(AcXref!Col001, 28, 10))
lblTable.Caption = mNomDeTable
If mTable <> mNomDeTable Then
mCompteur = 0
mTable = mNomDeTable
End If
AcXref.MoveNext
Else
ExtraitInfoLigne
Stats
Dictionnaire
XRef
AcXref.MoveNext
End If
Loop
End Sub
[Edited by Iain17 on 06-27-2000 at 09:46 AM]
Iain, thats with an i by the way!
-
Jun 26th, 2000, 09:31 PM
#4
Thread Starter
Lively Member
Will try this right away...
I'll keep you posted...
Thanks.
Patrice
-
Aug 28th, 2000, 10:29 AM
#5
Thread Starter
Lively Member
I don't understand...
I posted a reply a long time ago for this one... Must have got lost somewhere...
It worked wonderfully. It was just a question of understanding the structure of a DO WHILE a little better.
Thank you very much for your help Iain17.
Your help was greatly appreciated...
Sorry for the delay... :-/
Sincerely yours,
Patrice B. 
Information System Analyst
SAS 9.1.3, VB6 SP6, VB.Net 2003, SQL7.0/2000
-
Aug 28th, 2000, 10:50 AM
#6
Fanatic Member
Better late than never huh 
As always the pleasure was all mine
Iain, thats with an i by the way!
-
Aug 28th, 2000, 12:35 PM
#7
Addicted Member
Of Course Iain
I come to help(I really saw the prob before I scrolled down) but of course YOU(what are the odds) answered first. Lol
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|