View Single Post
Unread 20 May 2005, 05:21   #3
Howie17
Registered User
 
Join Date: Apr 2005
Posts: 5
Howie17 is an unknown quantity at this point
Re: VB 6 -Skipping lines of code...

There's no error it simply stops in the middle of a function and goes back to the procedure that called it without completing the rest of the code.


form load
-calls cmdSearch

cmdSearch
-Executes quite a few lines of code
-then executes a call ShiftDisplay function

ShiftDisplay
-executes quite a few lines of code but half way through goes back to cmdSearch at the End Sub line




Code:

After this line of code it goes back to the cmdSearch procedure:

Code:
adoShifts.Recordset.MoveFirst
    mintRecordCount = 1
    'Set shifts for each employee based on day of the week.
   Do While Not mintRecordCount = adoShifts.Recordset.RecordCount + 1
        
       If adoShifts.Recordset.Fields(0).Value = cmdEmployee1.Caption Then
                     txtEmployee(mintRecordCount).Left = "960"

It is then followed by multiple ElseIf statments, which i know its suppose to skip. The code that follows the If statement isn't executed.

Last edited by Howie17; 20 May 2005 at 14:10.
Howie17 is offline   Reply With Quote