Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling Primary Key from Form
Message
From
21/02/2003 18:13:31
 
 
To
21/02/2003 13:23:52
Julie Ball
Gardner Publications, Inc.
Cincinnati, Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00756279
Message ID:
00756470
Views:
9
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
Previous
Reply
Map
View

Click here to load this message in the networking platform