Results 1 to 15 of 15
  1. #1
    snowboarder234's Avatar
    snowboarder234 is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    243

    Relationships

    I set up the relationship as thus:Click image for larger version. 

Name:	rltnshp.jpg 
Views:	12 
Size:	75.3 KB 
ID:	6426

    My goal was when I open tblMove, I would see the names of people who had checked out the movie [tblLoanTo].
    However, when I open tblMovie I don't see the information from tblLoanedto:


    Click image for larger version. 

Name:	Rltnshp2.jpg 
Views:	10 
Size:	84.4 KB 
ID:	6427
    Thanks in advance to anyone who can offer a solution.
    Last edited by snowboarder234; 02-23-2012 at 11:56 AM. Reason: Formatting

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    How about telling us in a few lines what exactly you are trying to do?
    To " see " the fields and values from different tables, you will need a query.

  3. #3
    snowboarder234's Avatar
    snowboarder234 is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    243
    Thank you. My goal is to have the record from tblLoanTo appear the corresponding drop down field for each record of tblMovie when you click on the asterik. I tried the query, but because something is obviously amiss in the first two tables, the query just returns empty fields.
    Click image for larger version. 

Name:	Image3.jpg 
Views:	9 
Size:	42.3 KB 
ID:	6429

  4. #4
    snowboarder234's Avatar
    snowboarder234 is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    243

    Here is the zipped file if it helps

    I have attached the zipped file. My apology -- I should have done that in the beginning.
    Attached Files Attached Files

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    I can't open accdb file.

    You need 3 tables

    MOVIE
    movieId PK
    movieName
    movieCopyNumber
    other movie stuff

    CUSTOMER
    customerId PK
    customerFirstName
    customerLastName
    customerAddress1
    customerAddress2
    customerCity
    customerState
    customerZip
    customerPhone
    customerEmail


    LOANTO PK
    loantoId FK
    movieId FK
    dateBorrowed
    hasbeenReturned
    hasPaid



    LOANTO is a junction table allows the Customer to Borrow Movie more than once. If you do not know what a junction table is, Google it.

  6. #6
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,071
    Opened your database you have the foreign Key in your tblLoans but there's no data in the field thus no link to the movie table. Secondly I highly recommend Orange's data structure your existing structure will result in a DB that is not in 3rd normal form and as you add more data you will have more problems.

  7. #7
    snowboarder234's Avatar
    snowboarder234 is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    243
    Quote Originally Posted by orange View Post
    I can't open accdb file.

    You need 3 tables

    MOVIE
    movieId PK
    movieName
    movieCopyNumber
    other movie stuff

    CUSTOMER
    customerId PK
    customerFirstName
    customerLastName
    customerAddress1
    customerAddress2
    customerCity
    customerState
    customerZip
    customerPhone
    customerEmail


    LOANTO PK
    loantoId FK
    movieId FK
    dateBorrowed
    hasbeenReturned
    hasPaid



    LOANTO is a junction table allows the Customer to Borrow Movie more than once. If you do not know what a junction table is, Google it.
    Thank you for your assistance. I took a stab at creating a junction table, it worked....sort of. I'm still confused on the relationships. I'm sorry you weren't able to open the file. Also, thanks for the exhaustive listing of fields. I had planned on completing that after the relationships are completed. In any case, I appreciate your help.

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  9. #9
    snowboarder234's Avatar
    snowboarder234 is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    243

    Attempted Junction Table

    Thank you for your time and assistance. I made a less than successful attempt at creating a junction table. I couldn't figure out the second junction table relationship. If you have the time and once again can open the zipped file, I would appreciate any advice you have to offer because I know, at this point, it's still not correct.
    Attached Files Attached Files

  10. #10
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    I have acc2003. It uses mdb format. I can not use or open an accdb file.

  11. #11
    snowboarder234's Avatar
    snowboarder234 is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    243
    Quote Originally Posted by RayMilhon View Post
    Opened your database you have the foreign Key in your tblLoans but there's no data in the field thus no link to the movie table. Secondly I highly recommend Orange's data structure your existing structure will result in a DB that is not in 3rd normal form and as you add more data you will have more problems.
    Please see my last posting on this thread. I meant to reply quoting your response but forgot. I'm directing the response to you because you were the one able to open the zipped file. Please see latest attachment documenting my attempt at a junction table. Anyone else who can open the file is certainty welcome to respond as well.

  12. #12
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,071
    First You should be able to use the Save As in Access to save the DB as an MDB File.
    However your table designs are all messed up. Part of it is due to the relationships you've established You need to rethink that.
    Your borrowerid should have only data pertaining to the borrower
    borrowerid
    address
    city
    state
    zip
    phone

    Your movie table should only have data pertaining to the movie
    movieid
    moviename
    Release date
    Genre

    Your purchase date
    and purchase quantity should be in an Inventory table. Not the movie table due to the fact you may purchase the same movie on different days in different quantities depending on demand.

    Your junction table is essentially your working table
    you'd have
    borrowerid
    movieid
    mediatypeid
    borroweddate
    returnduedate
    actualreturndate



    actors maybe

  13. #13
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,071
    oops meant to remove the actors maybe it scrolled down out of sight and I forgot it.

  14. #14
    snowboarder234's Avatar
    snowboarder234 is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    243
    Quote Originally Posted by orange View Post
    I have acc2003. It uses mdb format. I can not use or open an accdb file.
    I did research on how to convert an accdb to an mdb. The instructions I found said to use the save and publish function. However, it still came up with the accdb file extension. I didn't want to waste anyone's time be uploading the same file again. If you know of another method, please feel free to share it with me.

  15. #15
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Relationships
    By funkygoorilla in forum Database Design
    Replies: 3
    Last Post: 10-30-2011, 10:30 PM
  2. Relationships I think
    By darlaj5 in forum Access
    Replies: 2
    Last Post: 05-04-2011, 08:37 PM
  3. Relationships again
    By BarbT in forum Access
    Replies: 2
    Last Post: 11-09-2010, 04:12 AM
  4. One to many relationships
    By CoachBarker in forum Database Design
    Replies: 1
    Last Post: 09-13-2010, 09:01 PM
  5. Relationships?
    By rosh41 in forum Database Design
    Replies: 2
    Last Post: 06-23-2010, 01:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums