Forum Discussion
hedwards400
Jan 26, 2022Copper Contributor
Primary key sequence defined by selections from a Lookup Table
I’m trying to use information in a field to set a number sequence for my primary key field. For example, I have a dropdown lookup with the following word choices One, Two, Three in field b. If I cho...
MariaBarnes
Jan 26, 2022MVP
You should be able to use the BeforeInsert event of your form to accomplish this. You will also need a Seed table where you store the last used value for each of your sequences. On the BeforeInsert event, get the appropriate Seed number, increment it, and use that for your primary key. You probably do not need me to tell you this, but the type of the Primary Key should NOT be autonumber...
- hedwards400470Jan 26, 2022Copper Contributor
Thanks for the information. I will pursue this approach.