Results 1 to 5 of 5

Thread: Help please

  1. #1
    New Lounger
    Join Date
    Mar 2014
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Help please

    When designing forms, combo boxes are the best choice for foreign keys because foreign key values must match one of the primary key values in the related primary key. What kind of problems would you encounter if you do not use a combo box for foreign keys? What are some of the benefits of using combo boxes?

  2. Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Platinum Lounger
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    3,619
    Thanks
    7
    Thanked 231 Times in 219 Posts
    If this is homework please let us know - we don't mind helping with homework, but it's best to be upfront about it.

    cheers, Paul

  4. The Following User Says Thank You to Paul T For This Useful Post:

    mrjimphelps (2014-03-11)

  5. #3
    New Lounger
    Join Date
    Mar 2014
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Paul T View Post
    If this is homework please let us know - we don't mind helping with homework, but it's best to be upfront about it.

    cheers, Paul

    Yes this is homework

  6. #4
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    6,194
    Thanks
    201
    Thanked 785 Times in 719 Posts
    Ariane,

    IMHO the foreign key should never be displayed in a form or if it is it should be in a non-editable control. The foreign key should be set by code behind the form when a child record is added the primary key of parent record is copied by the code to the foreign key field of the child record. This way you won't get errors by having an incorrect foreign key value. HTH
    May the Forces of good computing be with you!

    RG

    VBA Rules!

    My Systems: Desktop Specs
    Laptop Specs


  7. The Following User Says Thank You to RetiredGeek For This Useful Post:

    Ariane Mark (2014-03-11)

  8. #5
    Platinum Lounger
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    3,619
    Thanks
    7
    Thanked 231 Times in 219 Posts
    Assuming you must choose the foreign key a combo box allows you to list the keys. Not using a combo box means the user would have to type, maybe from a displayed list, and typos are your worst nightmare.

    cheers, Paul

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •