*-- This program returns the the form type *-- of the currently slected form type *-- this case the form type in *-- AQCVik\*.dat*Determin what type form has been selected FUNCTION FORMTYPE PRIVATE Temppath,Value PRIVATE ARRAY laBatSel1 PRIVATE datafile,lnFileHand,TemplcFormNo Temppath = gcDrvLoc + gcAQCVik + "*.DAT" Value = ADIR(laBatSel1,Temppath) datafile = laBatSel1[1,1] lnFileHand = FOPEN(gcDrvLoc + gcAQCVik + datafile, 0) TemplcFormNo = FGETS(lnFileHand,5) lcFormNo = ALLTRIM(SUBSTR(TemplcFormNo,2)) *IF glDBug *WAIT "Hi there " + lcFormNo WINDOW *ENDIF IF lnFileHand <> -1 =FCLOSE(lnFileHand) ENDIF RETURN lcFormNo