I have another problem. Can anyone please take a look at this part of code. when use Seek function to seek Provno2 with same FYE but it always return as zero record. but I know for sure that we have record that match the criteria in our DBF1. Please tell me what's wrong this this code. Thanks CVL
* OPEN UPDATE DATABASE
USE Startime NEW
* OPEN PDF DATABASE
USE PDF1 NEW
INDEX ON PROVNO2 + (DTOS(FYE)) to prono
*****************************************************
* SKIP THROUGH EACH RECORD IN THE UPDATE DATABASE
* UPDATE DBF FILE
*****************************************************
DO WHILE !Startime -> (eof())
SEEK Startime ->PROVNO2 + startime -> (DTOS(FYE))
IF found()
IF !EMPTY(Startime ->AFCODE)
IF !EMPTY(PDF1 ->POA)
REPLACE POA WITH Startime ->AFCODE
ELSE
DO ERRORLINE WITH Startime ->EmployNo + " " + StarTime ->PROVNO2 + Startime ->(DTOC(FYE)) + " POA" + " TARGET FIELD EMPTY " +;
Startime ->POA
ENDIF
ENDIF
IF !EMPTY(startime ->DRCODE)
IF !EMPTY(PDF1 -> DRTYPE)
REPLACE drtype WITH Startime ->drcode
ELSE
DO ERRORLINE WITH Startime ->EmployNo + " " + StarTime ->PROVNO2 + Startime ->(DTOC(FYE)) + " DRCODE" + " TARGET FIELD EMPTY " +;
Startime ->DRCODE
ENDIF
ENDIF
IF !EMPTY(startime ->FEXITIND)
IF !EMPTY(PDF1 -> AFCOMPIND)
REPLACE afcompind WITH Startime ->fexitind
ELSE
DO ERRORLINE WITH Startime ->EmployNo + " " + StarTime ->PROVNO2 + Startime ->(DTOC(FYE)) + " FEXITIND" + " TARGET FIELD EMPTY " +;
Startime ->FEXITIND
ENDIF
ENDIF
IF !EMPTY(startime -> prexitind)
IF !EMPTY(PDF1 -> PREXITIND)
REPLACE prexitind WITH Startime ->prexitind
ELSE
DO ERRORLINE WITH Startime ->EmployNo + " " + StarTime ->PROVNO2 + Startime ->(DTOC(FYE)) + " PREXITIND" + " TARGET FIELD EMPTY " +;
Startime ->PREXITIND
ENDIF
ENDIF
RECORD++
ENDIF
SKIP ALIAS Startime
ENDDO
* OPEN UPDATE DATABASE
USE Startime NEW
* OPEN PDF DATABASE
USE PDF1 NEW
INDEX ON PROVNO2 + (DTOS(FYE)) to prono
*****************************************************
* SKIP THROUGH EACH RECORD IN THE UPDATE DATABASE
* UPDATE DBF FILE
*****************************************************
DO WHILE !Startime -> (eof())
SEEK Startime ->PROVNO2 + startime -> (DTOS(FYE))
IF found()
IF !EMPTY(Startime ->AFCODE)
IF !EMPTY(PDF1 ->POA)
REPLACE POA WITH Startime ->AFCODE
ELSE
DO ERRORLINE WITH Startime ->EmployNo + " " + StarTime ->PROVNO2 + Startime ->(DTOC(FYE)) + " POA" + " TARGET FIELD EMPTY " +;
Startime ->POA
ENDIF
ENDIF
IF !EMPTY(startime ->DRCODE)
IF !EMPTY(PDF1 -> DRTYPE)
REPLACE drtype WITH Startime ->drcode
ELSE
DO ERRORLINE WITH Startime ->EmployNo + " " + StarTime ->PROVNO2 + Startime ->(DTOC(FYE)) + " DRCODE" + " TARGET FIELD EMPTY " +;
Startime ->DRCODE
ENDIF
ENDIF
IF !EMPTY(startime ->FEXITIND)
IF !EMPTY(PDF1 -> AFCOMPIND)
REPLACE afcompind WITH Startime ->fexitind
ELSE
DO ERRORLINE WITH Startime ->EmployNo + " " + StarTime ->PROVNO2 + Startime ->(DTOC(FYE)) + " FEXITIND" + " TARGET FIELD EMPTY " +;
Startime ->FEXITIND
ENDIF
ENDIF
IF !EMPTY(startime -> prexitind)
IF !EMPTY(PDF1 -> PREXITIND)
REPLACE prexitind WITH Startime ->prexitind
ELSE
DO ERRORLINE WITH Startime ->EmployNo + " " + StarTime ->PROVNO2 + Startime ->(DTOC(FYE)) + " PREXITIND" + " TARGET FIELD EMPTY " +;
Startime ->PREXITIND
ENDIF
ENDIF
RECORD++
ENDIF
SKIP ALIAS Startime
ENDDO