Go Back   Access World Forums > Microsoft Access Discussion > General

Thread Tools Rate Thread Display Modes
Old 04-15-2019, 03:10 AM   #16
Uncle Gizmo
Nifty Access Guy
Uncle Gizmo's Avatar
Join Date: Jul 2003
Location: Newbury Berks UK
Posts: 10,270
Thanks: 525
Thanked 926 Times in 878 Posts
Uncle Gizmo is a jewel in the rough Uncle Gizmo is a jewel in the rough Uncle Gizmo is a jewel in the rough
Send a message via Skype™ to Uncle Gizmo
Re: Help with database

Originally Posted by mike60smart View Post

I tend to use Autonumber in every table.
I think some people would argue that you don't need an autonumber in something like say, a many to many table. However like you, I do tend to add an auto number field, particularly while developing, because it gives you some insight if something is going wrong.

Sent from my SM-G925F using Tapatalk

|                                     |
|      Uncle Gizmo              |
|                                     |
|                                     |
| Get $20 worth of "Nifty Code"       |
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
| | Ooo | |_________________ooO____( )________| ( ) ) / \ ( (_/ \_)
Uncle Gizmo is online now   Reply With Quote
Old 04-15-2019, 06:46 AM   #17
Pat Hartman
Super Moderator
Join Date: Feb 2002
Location: Stratford,Ct USA
Posts: 28,112
Thanks: 15
Thanked 1,566 Times in 1,489 Posts
Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all
Re: Help with database

In a m-m table that has a child table, you do need an autonumber as PK to give you a single field PK for use in combos or listboxes but when the m-m table has no child tables, you can just use a compound PK comprised of the two FK's. For consistancy, I generally add an Autonumber as the PK even though it is redundant. The CRITICAL point is that you still MUST have a unique index on the two PKs or whatever makes the row unique. In some cases these m-m tables need even more columns for uniqueness. For example, if qualifications expire, there would be three parts to the unique ID - EmpID, JobID, ExpireID. That would allow the table to contain a new row for each expiration otherwise, you would need an additional child table if you needed to keep history of the certifications.

Bridge Players Still Know All the Tricks
Pat Hartman is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Database or Object read only and Type Mismatch error for a Serial Number Database surferdude800 Modules & VBA 16 06-17-2015 07:14 AM
Question MS Access 2013 Reporting database connection to SQL Azure Database failing to connect BabaTana General 9 10-08-2013 08:18 AM
Access 2013 Web Database-Trying to display an image on a report with desktop database kmcclaff Reports 0 08-05-2013 03:35 PM
desktop icon for the database moves every time I open/close the database JSH20120710 Modules & VBA 4 07-11-2013 01:24 PM
Code connect to database and query select data from database in Ms Access 2007 veasna Queries 2 11-29-2010 12:25 PM

All times are GMT -8. The time now is 05:14 AM.

Microsoft Access Help
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post

Sponsored Links

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World