>>The other think you could do is before you use the primarykey function on a free table is consider the tag/key you are going to use. Look at the highest value in the table. Go into the registry manager and create a counter manually and set its value to the highest key value that exists in the table. Then in your code, use primarykey() and specify the name of the counter you manually created as the primarykey counter name argument. The primarykey will simply start from the counter's current value.<<
OK, this is something similar to what I have done since I posted the prior message. I created a custom function called IncreKey() which was created by modifying the PrimaryKey() function. If a Primary index field isn't found in a free table (which it never is), it will use the cField parameter of PrimaryKey() as the controlling index to generate the increment for. After calling this once, I can just use the PrimaryKey() function as normal.
Thanks for your help, I was just making sure I wasn't missing something within CodeMine that already did this.
Mel Cummings
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only