Access 2007-2013
Access 2000-2003
Seminars
Tips & Tricks
Access Forum
Course Index Insider Circle
Collapse Menubar
 
Tutorials   News   Tips   Templates   Forums   Help   Logon   Order  
 

News      User Comments     History     Notify Me

6/20/2012 1:34:26 AM
Access Relationship Seminar
 
In this seminar, you will learn just about everything there is to know about relationships in Microsoft Access. Setting up proper relationships between your tables is absolutely crucial to building a successful database. Bad table design, and bad relationships between those tables, is disasterous, and will cause you nothing but trouble down the line.

This seminar covers just about all of the different possible relationship scenarios that you will ever come across. We will build eight (8) different database projects so you can see how to set up good relationships between your tables. This seminar will teach you about all of the following types of relationships:

1. No relationships
2. One-to-Many
3. One-to-One
4. Many-to-Many
5. Self-Join One-to-Many
6. Self-Join Many-to-Many
7. Reverse Relationships
8. Multiple Relationships

We will build sample databases to track:

1. Children to Parents with their relation (one-to-many)
2. Which parents receive mail on their child's behalf
3. Student data with a secondary optional detail table (one-to-one)
4. Vendors to Products and vice versa (many-to-many)
5. Employees to Supervisors (self-join, one-to-many)
6. Complete family history with relationships (self-join, many-to-many)
7. Organizations to Members (whether companies, families, charities, etc.)

You can learn more about this seminar here: Access Relationship Seminar

Of course if you have any questions, post them here!

Permanent Link
Course Link: Access Relationship Seminar
Keywords: access relationships
Page Tag: whatsnew
Post Reply

Customers Addresses Jobs Comment from Mark @ Tue 5/7
Hi Richard, Thanks for your quick reply.

A JOB will have ONE AND ONLY ONE address. So I have one AddressID field in my JobT table.

I have a JobAddressSubF for showing and inputing new addresses in the JobF. The Sub form picks up the JobID ok, but I haven't found a way to get the AddressID from the subform to update onto the JobF.

I've tried a combo box on the main form using:

Forms!JobAddressSubF.Form!AddressID

To get it into the main form but haven't got it to work.

So I'm not sure where I'm going wrong here? Or should I scrap trying to get the AddressID over and just work with the JobID as this automatically comes up in the JobAddressSubF.

The other problem I'm having is when the Job address is the same as the customers home address. I have an "AsHomeAddress" option button, which when selected, I need the JobAddressSubF to automatically update to their home address and save the relationship with the JobT/AddressT.

I'm more than happy to have a paid session to get this resolved if needed. But I'm hoping it's something simple that I'm just not seeing yet?

Please can you help?


Reply from Richard Rost:

You should have 3 separate forms: CustomerF, AddressF, JobF. You would select an address from a list of addresses ON THE JOB FORM. You can use them as subforms if you want, but be sure to REQUERY the list if the addresses are changed otherwise they won't show up in the combo on the job form. Or just use separate forms and you won't have that problem. Enter the addresses on the address form. Close it. Open the Job form and pick it.

I wouldn't even bother storing a separate home address in the customer table. Put everything in the address table and just use your "AsHomeAddress" checkbox to indicate it.
Show Just This Thread        Post Reply
Customers Addresses Jobs Comment from Mark Bee @ Sat 5/4
I am having problems with understanding how to have one address table for my customers, that relate to the customers jobs, their invoices and quotes etc... I can have 1 customers with many jobs related to one address, then 1 customer with many address and many jobs. I've been unable this far to work out how to get this to work with out running into duplicating the same address in the address table.

I've tried to make work a junction table to work between the customers, jobs, address, quotes and invoices but end up confused. Even going through this relationship seminar twice I'm unable to see how the examples relate to what I'm trying to achieve.

Can anyone help?


Reply from Richard Rost:

I would have 3 tables: customers, addresses, jobs.

AddressT has CustomerID as a foreign key
JobT also has CustomerID as a foreign key

Now, assuming a JOB will have ONE AND ONLY ONE address, you could just have one AddressID field as a foreign key field in your JobT table.

If a job can have MULTIPLE addresses, then you need to set up a FOURTH table as a junction table which would look like:

AddressesForJobsT
ID: AutoNumber
JobID: Foreign Key to JobT
AddressID: Foreign Key to AddressT
Details...
Show Just This Thread        Post Reply
your the Best Comment from David Robinson @ Fri 5/3
Richard
All I can say your the Best, your courses and the best I have ever seen, easy to follow and you explain everything, I just need more time to get to all the courses I havew purchased and I will be purchasing more.


Thank you very much


Reply from Richard Rost:

Thanks, David. :)
Show Just This Thread        Post Reply
Parent Form Comment from PETER @ Tue 4/23
Please see my last comment - I just realized that rather than have Access build the parent form, I had built it myself using Form Design (as suggested by you in many other video's). When I let Access build the parent form for me, the subform behaved as expected - only showing subform values relevant to the item shown on the parent. What would I have done wrong in building the parent form from scratch compared to what Access does itself?


Reply from Richard Rost:

You can build the parent form from scratch. Just make sure you set up the link fields properties. Access SHOULD do that for you if your fields are named correctly (the same) on each of the forms.
Show Just This Thread        Post Reply
subform filtering Comment from PETER @ Tue 4/23
At minute 2:30 on the video the subform automatically shows only subform contents that match the VendorID on the parent form. That filtering doesn't seem to be occurring when I try to do it on one of my own subforms ... Is there something I missed on the video?


Reply from Richard Rost:

Access should have automatically set up a relationship between your main form and sub form. It's the LINK MASTER FIELD and LINK CHILD FIELD properties in the subform.
Show Just This Thread        Post Reply
I set up a table with a unique pt number which was Comment from Anonymous @ 2/26/2013
I set up a table with a unique pt number which was indexed as no duplicates and made it the Primary key. I used the unique number in  a 2nd form and made it the primary key, no duplicates, and was told I had broken the integrity rules as this duplicated values?? Relationships lesson 7 time 0259


Reply from Richard Rost:

Don't make it a primary key in your second table.
Show Just This Thread        Post Reply
Comment from Jennifer @ 2/25/2013
I have asked this somewhere else:   what if you have a lot of info about a single student / patient. Eg a unique pt ID but with up to 15 differing tables containing results or clinical findings. Each of these 15 is I think?  a 1 to 1 relationships, but there are 15 of them??? What do you call this and how does it  work.
Show Just This Thread        Post Reply
Multiple copies Comment from Roderick Barbour @ 12/2/2012
I have been questioning the concept that Richard has of making so many copies of each database as we went through the lessons, until I just hit a key or a combination of keys and just lost my whole database. Im an old IT guy and there was always a way of getting a file or document back. But with Access, once its gone it is really gone. WOW!! Great lesson.


Reply from Richard Rost:

There is a method to my madness. :)
Show Just This Thread        Post Reply
Combo Box Populate Another Field Comment from Tom @ 10/12/2012
Richard- I would like to use my choice in a combo box to populate another field without user intervention.  The combo box pulls from a table that contains catalog items. Each individual item also contains a number that corresponds with a product type (stored in a product type table)  Any thoughts?


Reply from Richard Rost:

Use an AfterUpdate event?
Show Just This Thread        Post Reply
Access Addiction Comment from   @ 7/17/2012
Brilliant AGAIN, Rick.
Couldn't honestly say anything was unknown to me but the real value in these seminars is that you show how to bring it all together.
Actually, I just realised that the one-to-one was a new idea from the point of view of security.
Well done, Rick, keep 'em coming to feed my Access adiction :o)
Regards
Chris


Reply from Richard Rost:

Ha ha. Thanks, Chris. I'm working on more crack for you right now. :)
Show Just This Thread        Post Reply
Access Relationship Seminar Comment from Kevin Robertson @ 7/16/2012
Hi Richard,

Completely loved this seminar - learned lots I didn't know.  Keep up the good work!


Reply from Richard Rost:

Thanks, Kevin.
Show Just This Thread        Post Reply
Comment from  Bruce @ 7/16/2012
Video 13 covers a lot of ground. I am grateful that I have had the opportunity of viewing this critical seminar.


Reply from Richard Rost:

Glad you're enjoying it.
Show Just This Thread        Post Reply
Cascade Delete Comment from Richard R @ 7/12/2012
Chris that's a very good question. See this tip video for my reply. :)
Show Just This Thread        Post Reply
Cascade Delete Comment from Chris @ 7/11/2012
My earlier question was asking: When does the data in a cascading table get deleted when there are several other records pointing to the same cascading record?

As an example - Three people (three records) in PersonT each refer to the same address data located within table AddressT. There exists a global relationship between these two tables using Foreign Key AddressID in the PersonT table and the Primary Key (AddressID) in the AddressT table. In each of the PersonT records, they each refer to the same address record with AddressT.

Will the AddressT record remain in the AddressT table until all three records have been deleted from PersonT?



(as a side note - yes I could try this; but I was asking so that others could also get an answer to this question)
Show Just This Thread        Post Reply
Cascade Delete Comment from  Chris @ 7/11/2012
Not to belabour this and just to ensure I understand. On the cascade deletes, if another record uses the same cascaded data, the common records are not deleted. It is only when there is one remaining record that uses this cascaded record that it is removed from the database. Is this correct? (ref: 15:00)


Reply from Richard Rost:

Cascade deletes come in handy if you delete a PARENT and want all of its CHILD records to be automatically deleted. I don't know what you mean about "common records." Can you explain with an example?
Show Just This Thread        Post Reply
enjoyed the relationship seminar Comment from Jim Upton @ 7/6/2012
Hi Richard

Readlly enjoy this relationship seminar. I will need to watch it again but thats me at being slow getting my head around it.

I would be interested in expantion on any of those comments that you made and adding payments into this and making reports as a address book


Reply from Richard Rost:

Thanks, Jim.
Show Just This Thread        Post Reply
Comment from will powers @ 6/29/2012
is there a way besides going into the relative typeT table like in the video to make the opposite ID?  I want to make a database for our parade in town.  the idea would be to fill up a float with people and show floats that aren't full yet and floats that are full. then use the reverse to show what people went on what float in the past.  

- Will


Reply from Richard Rost:

Well, the floats that are full/not full would just be a simple DCOUNT (or a form footer total) of the number of child records.

Making a query to show who was on which float in the past should be a simple matter too.
Show Just This Thread        Post Reply

Add Your Comments or Subscribe
 
If you just want to subscribe to get email updates when the News is updated, then enter your name and email address and check the Notify Me box below. If you would optionally like to add your comments below to be posted, they are welcome.
 
  Your Name:  Shown
  Your Email:  NOT Shown
  Subject:
  Comments:

 

Sorry about this step. It's just to keep the spam bots away:
  Verify: What is 8+6:
  
  Notify me when the News is updated.
  Remember Me for my next comments
  
 
 
Please do not use this form for Customer Service inquiries! If you have questions about your account, shipping info, courses you've ordered, need passwords, etc. please use the Customer Service Center instead.

I value your comments. They will be displayed on this page (above). Your name will be displayed, but your email address will not be. As always, I promise to never give away your personal information to anyone else, ever.

 

 

You may want to read these articles from the 599CD News:

5/14/2013Access Tip: Many-to-Many Relationships
5/14/2013Access Expert 5 Handbook Ready
5/10/2013Access Tip: Email Using Outlook
5/10/2013Microsoft Access Expert 5
5/2/2013Access Amort Handbook
4/29/2013Microsoft Access Expert 4
4/28/2013Access Tip: Toggle Button Colors
4/27/2013Access Expert 4
4/23/2013New Access Tip: Conditional Format Expression
4/15/2013New Access Tip: Grid Lines v. Dots
   
Learn
 
Microsoft Accessindex
Microsoft Excelindex
Microsoft Wordindex
Microsoft Windowsindex
Microsoft PowerPointindex
Adobe Photoshopindex
Visual Basicindex
Active Server Pagesindex
Online Seminars
More...
Customers
 
Account Login
Online Theater
Downloads
Lost Password
Free Upgrades
Insider Circle
Info
 
Latest News
New Releases
User Forums
Tips & Tricks
Search Our Site
Waiting List
Production Schedule
Collapse Menus
Help
 
Live Chat
Customer Support
WalkThru Tutorials
Troubleshooting
FAQs
TechHelp
Consulting Services
About Us
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Order
 
Video Tutorials
Handbooks
MYOLP Memberships
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Live Chat
General Contact Info
Support Policy
Contact Form
Email Us
Mailing Address
Phone Number
Fax Number
Course Survey