* kMover.prg Make a copy to 'kTable' before delete record! * As the original Table can pack at anytime if necessary! LPARAMETERS oTable, oKey, oKey2 LOCAL kTable, kKey IF TYPE("gcUser") = "U" PUBLIC gcUser && define public Variable to know who Does it! gcUser = "" DO WHILE EMPTY(gcUser) do form requestUser to gcUser ENDDO ENDIF USE &oTable AGAIN IN 0 SHARED SELECT &oTable kKey = ALLTRIM(&oKey) kTable = "k" + Alltrim(oTable) IF USED([&kTable]) USE IN &kTable ENDIF IF !FILE([&kTable]+".dbf") && either lost file or new create SELECT &oTable COPY STRUCTURE TO &kTable OPEN DATABASE LOVELYHM SHARED ADD TABLE &kTable * * Problem at this point as Cyclic in using table!! * but no problem when developing!! +_+" * Either I comment the above two coding or not still fail! * ALTER TABLE &kTable; ADD COLUMN UsedTime T NOT NULL; DEFAULT DATETIME() ; ADD COLUMN UsedBy C(40) NULL; DEFAULT gcUser ; ADD COLUMN isDelete L NULL; ADD PRIMARY KEY UsedTime TAG UsedTime * Additional Fields for recording the User accesstime, who and action! USE IN &kTable ENDIF use &kTable AGAIN in 0 shared * * Another Error Above here when run it in execute file or * in other .prg * But sure work when in development Browse!! +_+" SELECT &kTable Append from &oTable for &oKey = "&kKey" IF !DELETED() SELECT &kTable REPLACE isDelete WITH .T. ENDIF use in &kTable if !used([&oTable]) USE &oTable again in 0 shared ENDIFPreviously, I have make a version on Recno() but still error on