Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unique ID increment
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00128168
Message ID:
00128251
Views:
16
>In the record validation rule for the table I do something like this
>
IF EMPTY(TheMainKeyField)
>  USE (DBF()) AGAIN IN 0 ALIAS AutoNumber ORDER TheMainKeyIndex
>  GOTO BOTTOM IN AutoNumber
>  REPLACE TheMainKeyField WITH AutoNumber.TheMainKeyField+1
>  USE IN AutoNumber
>ENDIF
Bear in mind that this won't work in a multi-user situation, where two users might grab that record at the same time. The separate table for keys works better here.
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform