>Am I correct in assuming that the CodeMine 7 PrimaryKey() function does not work with free tables?
Incorrect. Primary key will work just fine with free tables. You may want to check out the parameters for primary key. If you dont specify your own counter name, primarykey() will generate a counter name that includes the path to the free table. I don't like that so I generally specify my own key name when using free tables.
>or should I just create my own?
Don't do that! <s>
>And finally, if I create my own I was thinking it should be placed in the cmDataManager.AfterNew
AfterNew() is the logical place but remember it fires when you create the record so if you abandon the record, you have allocated a key. BeforeUpdate() is also a candidate for this but if you need the key for related records before saving, stick with AfterNew().
-=Gary