Рет қаралды 2,576
In this Viewer Request video, we'll take a look at a user request to enable a composite primary key made up of a category field plus an incrementing integer field that increments from 1 for each category and re-uses integer values if a record is deleted. We'll program a simple VBA function to determine the next available integer for a chosen category. This function can be called anywhere in your app where you create a new record for the target table.
Important takeaways from this video are:
1. Building a composite primary key in the table builder.
2. Writing VBA logic to determine the next available number for a category.
Don't spend too much time on the form design part since each app will be different. In this case I used one unbound control to enable composite key insertion. However, you may create an entire unbound form, use this procedure in your other procedures, or perform other tasks with the logic in point 1 and 2 above.
Join me on Patreon!
/ mackenziedataengineering
Demo of my BZ RDP Cloaker:
www.patreon.co...
Want the code from this video?
mackenziemacken...
Interested in transforming your career or finding your next gig?
system.billzon...
Want my team to do a project for you? Let's get to it!
system.billzon...
Contact form you can find at www.mackenziema...
Follow me on social media:
/ mackenziedataanalytics
/ seamacke
/ seamacke
/ seamacke
/ psmackenzie
Get Microsoft Office including Access:
click.linksyne...
Got a KZbin Channel? I use TubeBuddy, it is awesome. Give it a try:
www.tubebuddy....