Calator,
I went to the online screen via the ellipse application and documented from the start what I did.
for example I wanted to retrieve the employee time records to display on a vb screen.
so in the online screen MSO89T I selected option 1 and entered the employee id and clicked OK. I was taken to the MSO89C screen. and every time I clicked OK I was taken to the next page. until the message at the bottom of the screen says Page 005/005. (There was 5 pages of time records for this employee). Now this time when I press enter I am taken back to the MSO89T.
In my code I had to execute the mso screen MSO89T and fill in the option field and employee id. and execute the OK command. then you a sitting on the MSO89C with the information for employee. I had to run a loop, checking each occurence on the screen to load up my flex grid with the information from the MSO89T. I also had to do splitting up of time fields to accumulate for regular time verses overtime. when I was done with the seventh occurence on the screen I had to execute the OK command and then check to see where I landed. If I landed on the screen name MSM89TA I knew I had returned to the MSO89T and was done. There is a lot of code here. I am new to vb 6 so it may not be as effecient or pretty as other code.
My code looks like this:
Myform.gobjMIMS.Screen.ExecuteMSO ("MSO89T"

Myform.gobjMIMS.Screen.MSO.Fields("OPTION1I"

= "1"
Myform.gobjMIMS.Screen.MSO.Fields("EMP_ID1I"

= sEmployeeId
Myform.gobjMIMS.Screen.MSO.Commands("OK"

.Execute
If Trim(Myform.gobjMIMS.Screen.MSO.Error) <> "" Then
strErrorMessage = Trim(Myform.gobjMIMS.Screen.MSO.Error)
Myform.gobjMIMS.Screen.MSO.Commands("Cancel"

.Execute
Myform.gobjMIMS.Screen.MSO.Commands("Home"

.Execute
Exit Function
End If
For int3 = 1 To 299
strSkillDisplay = Myform.gobjMIMS.Screen.MSO.Fields("SKLDISPLAY1I"

strEmployeeId = Myform.gobjMIMS.Screen.MSO.Fields("EMP_ID1I"

strEmployeeName = Myform.gobjMIMS.Screen.MSO.Fields("EMP_NAME1I"

strPhysicalLocation = Myform.gobjMIMS.Screen.MSO.Fields("PHYS_LOC1I"

strPhysicalLocationDesc = Myform.gobjMIMS.Screen.MSO.Fields("PHYS_LOC_DESC1I"

strRoster = Myform.gobjMIMS.Screen.MSO.Fields("ROSTER1I"

strRosterDesc = Myform.gobjMIMS.Screen.MSO.Fields("ROSTER_DESC1I"

strAward = Myform.gobjMIMS.Screen.MSO.Fields("AWARD1I"

strAwardDesc = Myform.gobjMIMS.Screen.MSO.Fields("AWARD_DESC1I"

strRateReference = Myform.gobjMIMS.Screen.MSO.Fields("RREF1I"

strRateReferenceDesc = Myform.gobjMIMS.Screen.MSO.Fields("RREF_DESC1I"

strRateRefType = Myform.gobjMIMS.Screen.MSO.Fields("RREF_TYPE1I"

strRateRefAmount = Myform.gobjMIMS.Screen.MSO.Fields("RREF_AMOUNT1I"

strTranDate = Myform.gobjMIMS.Screen.MSO.Fields("TRAN_DATE1I1"

strTranDate = Trim(strTranDate)
If strTranDate >= sFromDate Then
If strTranDate > sToDate Then
strjunk = "Do nothing"
Else
int2 = int2 + 1
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 1) = Myform.gobjMIMS.Screen.MSO.Fields("TRAN_DATE1I1"

frmPayLab2.MSFlexGrid1.TextMatrix(int2, 4) = Myform.gobjMIMS.Screen.MSO.Fields("WORK_CODE1I1"

strStartTime = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ACT_START1I1"

)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 2) = strStartTime
intpos = InStr(strStartTime, "."

intpos1 = intpos - 1
strStartHours = Left(strStartTime, intpos1)
strStartMins = Right(strStartTime, 2)
intstarthours = strStartHours
intstartmins = strStartMins
strStopTime = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ACT_STOP1I1"

)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 3) = strStopTime
intpos = InStr(strStopTime, "."

strStopHours = Left(strStopTime, intpos - 1)
strStopMins = Right(strStopTime, 2)
intstophours = strStopHours
intstopmins = strStopMins
If intstophours > intstarthours Then
intworkhrs2 = intstophours - intstarthours
End If
If intstophours = intstarthours Then
intworkhrs2 = 0
End If
If intstopmins > intstartmins Then
intworkmin2 = intstopmins - intstartmins
End If
If intstopmins = intstartmins Then
intworkmin2 = intstopmins
End If
If intstopmins < intstartmins Then
intworkmin2 = intstartmins - intstopmins
intworkhrs2 = intworkhrs2 - 1
End If
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 5) = intworkhrs2
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 6) = intworkmin2
strAllowanceCode = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_CODE11I1"

If strAllowanceCode = "004" Then
strAllowanceUnits = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_UNITS11I1"

)
intpos = InStr(strAllowanceUnits, "."

intpos1 = intpos - 1
strLunchHours = Left(strAllowanceUnits, intpos1)
strLunchMinutes = Right(strAllowanceUnits, 2)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 7) = strLunchHours
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 8) = strLunchMinutes
End If
strAllowanceCode = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_CODE21I1"

If strAllowanceCode = "004" Then
strAllowanceUnits = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_UNITS21I1"

intpos = InStr(strAllowanceUnits, "."

intpos1 = intpos - 1
strLunchHours = Left(strAllowanceUnits, intpos1 - 1)
strLunchMinutes = Right(strAllowanceUnits, 2)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 7) = strLunchHours
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 8) = strLunchMinutes
End If
strAllowanceCode = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_CODE31I1"

If strAllowanceCode = "004" Then
strAllowanceUnits = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_UNITS31I1"

intpos = InStr(strAllowanceUnits, "."

intpos1 = intpos - 1
strLunchHours = Left(strAllowanceUnits, intpos1 - 1)
strLunchMinutes = Right(strAllowanceUnits, 2)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 7) = strLunchHours
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 8) = strLunchMinutes
End If
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 9) = Myform.gobjMIMS.Screen.MSO.Fields("RATE_REF1I1"

End If
End If
strTranDate = Myform.gobjMIMS.Screen.MSO.Fields("TRAN_DATE1I2"

strTranDate = Trim(strTranDate)
If strTranDate >= sFromDate Then
If strTranDate > sToDate Then
strjunk = "Do nothing"
Else
int2 = int2 + 1
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 1) = Myform.gobjMIMS.Screen.MSO.Fields("TRAN_DATE1I2"

frmPayLab2.MSFlexGrid1.TextMatrix(int2, 4) = Myform.gobjMIMS.Screen.MSO.Fields("WORK_CODE1I2"

strStartTime = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ACT_START1I2"

)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 2) = strStartTime
intpos = InStr(strStartTime, "."

intpos1 = intpos - 1
strStartHours = Left(strStartTime, intpos1)
strStartMins = Right(strStartTime, 2)
intstarthours = strStartHours
intstartmins = strStartMins
strStopTime = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ACT_STOP1I2"

)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 3) = strStopTime
intpos = InStr(strStopTime, "."

strStopHours = Left(strStopTime, intpos - 1)
strStopMins = Right(strStopTime, 2)
intstophours = strStopHours
intstopmins = strStopMins
If intstophours > intstarthours Then
intworkhrs2 = intstophours - intstarthours
End If
If intstophours = intstarthours Then
intworkhrs2 = 0
End If
If intstopmins > intstartmins Then
intworkmin2 = intstopmins - intstartmins
End If
If intstopmins = intstartmins Then
intworkmin2 = intstopmins
End If
If intstopmins < intstartmins Then
intworkmin2 = intstartmins - intstopmins
intworkhrs2 = intworkhrs2 - 1
End If
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 5) = intworkhrs2
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 6) = intworkmin2
strAllowanceCode = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_CODE11I2"

If strAllowanceCode = "004" Then
strAllowanceUnits = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_UNITS11I2"

)
intpos = InStr(strAllowanceUnits, "."

intpos1 = intpos - 1
strLunchHours = Left(strAllowanceUnits, intpos1)
strLunchMinutes = Right(strAllowanceUnits, 2)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 7) = strLunchHours
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 8) = strLunchMinutes
End If
strAllowanceCode = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_CODE21I2"

If strAllowanceCode = "004" Then
strAllowanceUnits = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_UNITS21I2"

)
intpos = InStr(strAllowanceUnits, "."

intpos1 = intpos - 1
strLunchHours = Left(strAllowanceUnits, intpos1)
strLunchMinutes = Right(strAllowanceUnits, 2)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 7) = strLunchHours
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 8) = strLunchMinutes
End If
strAllowanceCode = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_CODE31I2"

If strAllowanceCode = "004" Then
strAllowanceUnits = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_UNITS31I2"

)
intpos = InStr(strAllowanceUnits, "."

intpos1 = intpos - 1
strLunchHours = Left(strAllowanceUnits, intpos1)
strLunchMinutes = Right(strAllowanceUnits, 2)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 7) = strLunchHours
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 8) = strLunchMinutes
End If
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 9) = Myform.gobjMIMS.Screen.MSO.Fields("RATE_REF1I2"

End If
End If
strTranDate = Myform.gobjMIMS.Screen.MSO.Fields("TRAN_DATE1I3"

strTranDate = Trim(strTranDate)
If strTranDate >= sFromDate Then
If strTranDate > sToDate Then
strjunk = "Do nothing"
Else
int2 = int2 + 1
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 1) = Myform.gobjMIMS.Screen.MSO.Fields("TRAN_DATE1I3"

frmPayLab2.MSFlexGrid1.TextMatrix(int2, 4) = Myform.gobjMIMS.Screen.MSO.Fields("WORK_CODE1I3"

strStartTime = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ACT_START1I3"

)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 2) = strStartTime
intpos = InStr(strStartTime, "."

intpos1 = intpos - 1
strStartHours = Left(strStartTime, intpos1)
strStartMins = Right(strStartTime, 2)
intstarthours = strStartHours
intstartmins = strStartMins
strStopTime = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ACT_STOP1I3"

)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 3) = strStopTime
intpos = InStr(strStopTime, "."

strStopHours = Left(strStopTime, intpos - 1)
strStopMins = Right(strStopTime, 2)
intstophours = strStopHours
intstopmins = strStopMins
If intstophours > intstarthours Then
intworkhrs2 = intstophours - intstarthours
End If
If intstophours = intstarthours Then
intworkhrs2 = 0
End If
If intstopmins > intstartmins Then
intworkmin2 = intstopmins - intstartmins
End If
If intstopmins = intstartmins Then
intworkmin2 = intstopmins
End If
If intstopmins < intstartmins Then
intworkmin2 = intstartmins - intstopmins
intworkhrs2 = intworkhrs2 - 1
End If
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 5) = intworkhrs2
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 6) = intworkmin2
strAllowanceCode = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_CODE11I3"

If strAllowanceCode = "004" Then
strAllowanceUnits = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_UNITS11I3"

)
intpos = InStr(strAllowanceUnits, "."

intpos1 = intpos - 1
strLunchHours = Left(strAllowanceUnits, intpos1)
strLunchMinutes = Right(strAllowanceUnits, 2)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 7) = strLunchHours
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 8) = strLunchMinutes
End If
strAllowanceCode = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_CODE21I3"

If strAllowanceCode = "004" Then
strAllowanceUnits = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_UNITS21I3"

)
intpos = InStr(strAllowanceUnits, "."

intpos1 = intpos - 1
strLunchHours = Left(strAllowanceUnits, intpos1)
strLunchMinutes = Right(strAllowanceUnits, 2)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 7) = strLunchHours
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 8) = strLunchMinutes
End If
strAllowanceCode = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_CODE31I3"

If strAllowanceCode = "004" Then
strAllowanceUnits = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_UNITS31I3"

)
intpos = InStr(strAllowanceUnits, "."

intpos1 = intpos - 1
strLunchHours = Left(strAllowanceUnits, intpos1)
strLunchMinutes = Right(strAllowanceUnits, 2)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 7) = strLunchHours
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 8) = strLunchMinutes
End If
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 9) = Myform.gobjMIMS.Screen.MSO.Fields("RATE_REF1I3"

End If
End If
strTranDate = Myform.gobjMIMS.Screen.MSO.Fields("TRAN_DATE1I4"

strTranDate = Trim(strTranDate)
If strTranDate >= sFromDate Then
If strTranDate > sToDate Then
strjunk = "Do nothing"
Else
int2 = int2 + 1
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 1) = Myform.gobjMIMS.Screen.MSO.Fields("TRAN_DATE1I4"

frmPayLab2.MSFlexGrid1.TextMatrix(int2, 4) = Myform.gobjMIMS.Screen.MSO.Fields("WORK_CODE1I4"

strStartTime = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ACT_START1I4"

)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 2) = strStartTime
intpos = InStr(strStartTime, "."

intpos1 = intpos - 1
strStartHours = Left(strStartTime, intpos1)
strStartMins = Right(strStartTime, 2)
intstarthours = strStartHours
intstartmins = strStartMins
strStopTime = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ACT_STOP1I4"

)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 3) = strStopTime
intpos = InStr(strStopTime, "."

strStopHours = Left(strStopTime, intpos - 1)
strStopMins = Right(strStopTime, 2)
intstophours = strStopHours
intstopmins = strStopMins
If intstophours > intstarthours Then
intworkhrs2 = intstophours - intstarthours
End If
If intstophours = intstarthours Then
intworkhrs2 = 0
End If
If intstopmins > intstartmins Then
intworkmin2 = intstopmins - intstartmins
End If
If intstopmins = intstartmins Then
intworkmin2 = intstopmins
End If
If intstopmins < intstartmins Then
intworkmin2 = intstartmins - intstopmins
intworkhrs2 = intworkhrs2 - 1
End If
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 5) = intworkhrs2
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 6) = intworkmin2
strAllowanceCode = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_CODE11I4"

If strAllowanceCode = "004" Then
strAllowanceUnits = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_UNITS11I4"

)
intpos = InStr(strAllowanceUnits, "."

intpos1 = intpos - 1
strLunchHours = Left(strAllowanceUnits, intpos1)
strLunchMinutes = Right(strAllowanceUnits, 2)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 7) = strLunchHours
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 8) = strLunchMinutes
End If
strAllowanceCode = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_CODE21I4"

If strAllowanceCode = "004" Then
strAllowanceUnits = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_UNITS21I4"

)
intpos = InStr(strAllowanceUnits, "."

intpos1 = intpos - 1
strLunchHours = Left(strAllowanceUnits, intpos1)
strLunchMinutes = Right(strAllowanceUnits, 2)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 7) = strLunchHours
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 8) = strLunchMinutes
End If
strAllowanceCode = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_CODE31I4"

If strAllowanceCode = "004" Then
strAllowanceUnits = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_UNITS31I4"

)
intpos = InStr(strAllowanceUnits, "."

intpos1 = intpos - 1
strLunchHours = Left(strAllowanceUnits, intpos1)
strLunchMinutes = Right(strAllowanceUnits, 2)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 7) = strLunchHours
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 8) = strLunchMinutes
End If
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 9) = Myform.gobjMIMS.Screen.MSO.Fields("RATE_REF1I4"

End If
End If
strTranDate = Myform.gobjMIMS.Screen.MSO.Fields("TRAN_DATE1I5"

strTranDate = Trim(strTranDate)
If strTranDate >= sFromDate Then
If strTranDate > sToDate Then
strjunk = "Do nothing"
Else
int2 = int2 + 1
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 1) = Myform.gobjMIMS.Screen.MSO.Fields("TRAN_DATE1I5"

frmPayLab2.MSFlexGrid1.TextMatrix(int2, 4) = Myform.gobjMIMS.Screen.MSO.Fields("WORK_CODE1I5"

strStartTime = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ACT_START1I5"

)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 2) = strStartTime
intpos = InStr(strStartTime, "."

intpos1 = intpos - 1
strStartHours = Left(strStartTime, intpos1)
strStartMins = Right(strStartTime, 2)
intstarthours = strStartHours
intstartmins = strStartMins
strStopTime = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ACT_STOP1I5"

)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 3) = strStopTime
intpos = InStr(strStopTime, "."

strStopHours = Left(strStopTime, intpos - 1)
strStopMins = Right(strStopTime, 2)
intstophours = strStopHours
intstopmins = strStopMins
If intstophours > intstarthours Then
intworkhrs2 = intstophours - intstarthours
End If
If intstophours = intstarthours Then
intworkhrs2 = 0
End If
If intstopmins > intstartmins Then
intworkmin2 = intstopmins - intstartmins
End If
If intstopmins = intstartmins Then
intworkmin2 = intstopmins
End If
If intstopmins < intstartmins Then
intworkmin2 = intstartmins - intstopmins
intworkhrs2 = intworkhrs2 - 1
End If
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 5) = intworkhrs2
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 6) = intworkmin2
strAllowanceCode = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_CODE11I5"

If strAllowanceCode = "004" Then
strAllowanceUnits = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_UNITS11I5"

)
intpos = InStr(strAllowanceUnits, "."

intpos1 = intpos - 1
strLunchHours = Left(strAllowanceUnits, intpos1)
strLunchMinutes = Right(strAllowanceUnits, 2)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 7) = strLunchHours
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 8) = strLunchMinutes
End If
strAllowanceCode = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_CODE21I5"

If strAllowanceCode = "004" Then
strAllowanceUnits = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_UNITS21I5"

)
intpos = InStr(strAllowanceUnits, "."

intpos1 = intpos - 1
strLunchHours = Left(strAllowanceUnits, intpos1)
strLunchMinutes = Right(strAllowanceUnits, 2)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 7) = strLunchHours
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 8) = strLunchMinutes
End If
strAllowanceCode = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_CODE31I5"

If strAllowanceCode = "004" Then
strAllowanceUnits = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_UNITS31I5"

)
intpos = InStr(strAllowanceUnits, "."

intpos1 = intpos - 1
strLunchHours = Left(strAllowanceUnits, intpos1)
strLunchMinutes = Right(strAllowanceUnits, 2)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 7) = strLunchHours
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 8) = strLunchMinutes
End If
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 9) = Myform.gobjMIMS.Screen.MSO.Fields("RATE_REF1I5"

End If
End If
strTranDate = Myform.gobjMIMS.Screen.MSO.Fields("TRAN_DATE1I6"

strTranDate = Trim(strTranDate)
If strTranDate >= sFromDate Then
If strTranDate > sToDate Then
strjunk = "Do nothing"
Else
int2 = int2 + 1
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 1) = Myform.gobjMIMS.Screen.MSO.Fields("TRAN_DATE1I6"

frmPayLab2.MSFlexGrid1.TextMatrix(int2, 4) = Myform.gobjMIMS.Screen.MSO.Fields("WORK_CODE1I6"

strStartTime = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ACT_START1I6"

)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 2) = strStartTime
intpos = InStr(strStartTime, "."

intpos1 = intpos - 1
strStartHours = Left(strStartTime, intpos1)
strStartMins = Right(strStartTime, 2)
intstarthours = strStartHours
intstartmins = strStartMins
strStopTime = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ACT_STOP1I6"

)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 3) = strStopTime
intpos = InStr(strStopTime, "."

strStopHours = Left(strStopTime, intpos - 1)
strStopMins = Right(strStopTime, 2)
intstophours = strStopHours
intstopmins = strStopMins
If intstophours > intstarthours Then
intworkhrs2 = intstophours - intstarthours
End If
If intstophours = intstarthours Then
intworkhrs2 = 0
End If
If intstopmins > intstartmins Then
intworkmin2 = intstopmins - intstartmins
End If
If intstopmins = intstartmins Then
intworkmin2 = intstopmins
End If
If intstopmins < intstartmins Then
intworkmin2 = intstartmins - intstopmins
intworkhrs2 = intworkhrs2 - 1
End If
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 5) = intworkhrs2
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 6) = intworkmin2
strAllowanceCode = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_CODE11I6"

If strAllowanceCode = "004" Then
strAllowanceUnits = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_UNITS11I6"

)
intpos = InStr(strAllowanceUnits, "."

intpos1 = intpos - 1
strLunchHours = Left(strAllowanceUnits, intpos1)
strLunchMinutes = Right(strAllowanceUnits, 2)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 7) = strLunchHours
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 8) = strLunchMinutes
End If
strAllowanceCode = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_CODE21I6"

If strAllowanceCode = "004" Then
strAllowanceUnits = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_UNITS21I6"

)
intpos = InStr(strAllowanceUnits, "."

intpos1 = intpos - 1
strLunchHours = Left(strAllowanceUnits, intpos1)
strLunchMinutes = Right(strAllowanceUnits, 2)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 7) = strLunchHours
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 8) = strLunchMinutes
End If
strAllowanceCode = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_CODE31I6"

If strAllowanceCode = "004" Then
strAllowanceUnits = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_UNITS31I6"

)
intpos = InStr(strAllowanceUnits, "."

intpos1 = intpos - 1
strLunchHours = Left(strAllowanceUnits, intpos1)
strLunchMinutes = Right(strAllowanceUnits, 2)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 7) = strLunchHours
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 8) = strLunchMinutes
End If
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 9) = Myform.gobjMIMS.Screen.MSO.Fields("RATE_REF1I6"

End If
End If
strTranDate = Myform.gobjMIMS.Screen.MSO.Fields("TRAN_DATE1I7"

strTranDate = Trim(strTranDate)
If strTranDate >= sFromDate Then
If strTranDate > sToDate Then
strjunk = "Do nothing"
Else
int2 = int2 + 1
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 1) = Myform.gobjMIMS.Screen.MSO.Fields("TRAN_DATE1I7"

frmPayLab2.MSFlexGrid1.TextMatrix(int2, 4) = Myform.gobjMIMS.Screen.MSO.Fields("WORK_CODE1I7"

strStartTime = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ACT_START1I7"

)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 2) = strStartTime
intpos = InStr(strStartTime, "."

intpos1 = intpos - 1
strStartHours = Left(strStartTime, intpos1)
strStartMins = Right(strStartTime, 2)
intstarthours = strStartHours
intstartmins = strStartMins
strStopTime = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ACT_STOP1I7"

)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 3) = strStopTime
intpos = InStr(strStopTime, "."

strStopHours = Left(strStopTime, intpos - 1)
strStopMins = Right(strStopTime, 2)
intstophours = strStopHours
intstopmins = strStopMins
If intstophours > intstarthours Then
intworkhrs2 = intstophours - intstarthours
End If
If intstophours = intstarthours Then
intworkhrs2 = 0
End If
If intstopmins > intstartmins Then
intworkmin2 = intstopmins - intstartmins
End If
If intstopmins = intstartmins Then
intworkmin2 = intstopmins
End If
If intstopmins < intstartmins Then
intworkmin2 = intstartmins - intstopmins
intworkhrs2 = intworkhrs2 - 1
End If
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 5) = intworkhrs2
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 6) = intworkmin2
strAllowanceCode = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_CODE11I7"

If strAllowanceCode = "004" Then
strAllowanceUnits = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_UNITS11I7"

)
intpos = InStr(strAllowanceUnits, "."

intpos1 = intpos - 1
strLunchHours = Left(strAllowanceUnits, intpos1)
strLunchMinutes = Right(strAllowanceUnits, 2)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 7) = strLunchHours
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 8) = strLunchMinutes
End If
strAllowanceCode = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_CODE21I7"

If strAllowanceCode = "004" Then
strAllowanceUnits = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_UNITS21I7"

)
intpos = InStr(strAllowanceUnits, "."

intpos1 = intpos - 1
strLunchHours = Left(strAllowanceUnits, intpos1)
strLunchMinutes = Right(strAllowanceUnits, 2)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 7) = strLunchHours
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 8) = strLunchMinutes
End If
strAllowanceCode = Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_CODE31I7"

If strAllowanceCode = "004" Then
strAllowanceUnits = Trim(Myform.gobjMIMS.Screen.MSO.Fields("ALLOW_UNITS31I7"

)
intpos = InStr(strAllowanceUnits, "."

intpos1 = intpos - 1
strLunchHours = Left(strAllowanceUnits, intpos1)
strLunchMinutes = Right(strAllowanceUnits, 2)
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 7) = strLunchHours
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 8) = strLunchMinutes
End If
frmPayLab2.MSFlexGrid1.TextMatrix(int2, 9) = Myform.gobjMIMS.Screen.MSO.Fields("RATE_REF1I7"

End If
End If
If frmPayLab2.MSFlexGrid1.TextMatrix(int2, 1) = "" Then
Exit For
End If
Myform.gobjMIMS.Screen.MSO.Commands("OK"

.Execute
If Myform.gobjMIMS.Screen.MSO.Name = "MSM89TA" Then
Exit For
End If
int3 = int2
Next int3
If Trim(Myform.gobjMIMS.Screen.MSO.Error) <> "" Then
MsgBox Myform.gobjMIMS.Screen.MSO.Error
End If
Myform.gobjMIMS.Screen.MSO.Commands("Home"

.Execute
End Function