Julie,
See the Primary Keys article on Craig's website (
www.craigberntson.com). Be sure the 'keys' table has the appropriate index on it. His article uses the default field, just like Chris has suggested to you.
VFP8 has this ability built in...
>I have an add button on my form and what I want to happen is that when a user clicks the add button then the click event finds that primary key from the forms data environment so that I can create a unique ID for the added record? I only have one table (from a database, not a free table) and (of course) one primary key - then I have another table that has all of the table names within the database for one field and the other field is my counter field so I can find what table I am using for that form then add one to the counter field to get my unique ID. Does all of this make sense? I am not sure how to find the correct table's primary key.
Steve Gibson