With thisform Store 0 To lnZLCount, lnZBCount llEOList = .F. && ie not at end of list I = 1 lnLenZoneList = ALEN( .aZoneList, 1) && 23/12/04 Do While I <= lnLenZoneList and not llEOList && 23/12/04 && Do while I <= lnLenZoneList ; &&and not llEOList && tabs on ZONELIST rec If .aZoneList( I) = 0 *TPMcD* If EMPTY( .aZoneList( I)) llEOList = .T. Else If .aZoneList( I) = tnZoneNo *TPMcD* If ALLTRIM( .aZoneList( I)) == ALLTRIM( tcStopNo) lnZLCount = lnZLCount + 1 Endif I = I + 1 Endif EndDo llEOList = .F. && ie not at end of list I = 1 Do While I <= lnLenZoneList not llEOList && 23/12/04 &&Do while I <= lnLenZoneList ; &&and not llEOList && tabs on zones we're trying to add If .aZoneBatch( I) = 0 *TPMcD* If EMPTY( .aZoneBatch( I)) llEOList = .T. Else If .aZoneBatch( I) = tnZoneNo *TPMcD* If ALLTRIM( .aZoneBatch( I)) == ALLTRIM( tcStopNo) lnZBCount = lnZBCount + 1 Endif I = I + 1 Endif EndDo Endwith