>No, it's just what was proposed here already. Instead of "&& This Was", you could just put this:
> Replace All PK with Gimme_Pk() for empty(PK)
>where gimme_pk is a function which delivers the new value of the PK. Case closed.
>If you're sure you have to do this for new records only (you seem to be adding records from more *.fla files), you could fill the PKs only once, when you exit this loop, or
>
> _rcn=recc()+1
> APPEND FROM (m.FileName)TYPE DELI
> if _tally>0
> go _rcn
> REPLACE REST ref_num WITH m.ref_num FOR EMPTY(ref_num)
> go _rcn
> Replace REST PK with Gimme_Pk() for empty(PK)
> endif
>
>This isn't greatly different, but might speed things up a little.
Nice Call Dragan! REPLACE REST... is something I never used before! But I don't see the REST clause in FPW2.6 syntax, which is the current platform for the code in question here. I'll have to look into this once everything else is in place to move this app over to the VFP world. Thanks!
Roxanne M. Seibert
Independent Consultant, VFP MCP
Code Monkey Like Fritos