Results 1 to 9 of 9
  1. #1
    wolfm is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Dec 2013
    Posts
    93

    Relationship Troubles

    Any reason we can't copy and paste txt into here?



    I am an intermediate user struggling t re-learn how to setup relationships among tables.
    I messed up my real database so I set up the attached, to back track issues. Trying to figure out how to fix relationships in order to accomplish the below:
    My dilemmas:

    When entering an order using the 'Orders' form, I would like the job number from the main form 'Orders' to copy into the 'order details subform'. It does not, and I believe my relationships are setup right.
    When I open table 'Orders' and click the plus sign at the left of each line, I would like to se theitems ordered, from the 'Order Details' table. I had this working on my real database, butnow is not working. I may have messed up the relationships. I want to see this so I know my relatioships are set up right.

    tHANkS AND SORRY FOR THE TYPOS. This forum is messed up today.
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    I am also having issue with copy/paste and even simply typing into post via Internet Explorer. Had to switch over to Edge. Issue started just this week. Nice to know now it is not just my PC.

    Relationships are not right. The only one that is correct is link between ID and OrderID.

    Do not build lookups in table. http://access.mvps.org/Access/lookupfields.htm

    Shows table should be source for JobNumberID combobox. JobNumber should not be in both Orders and OrderDetails.

    Why would you have a combobox for quantity? Certainly should not be linked to Orders ID field. Same for JobNumberID and Item. Only OrderID should link to ID in Orders.

    What is an Item?

    Then where are Customers, Suppliers, Products tables? Are shows your products? What is this db for?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    WolfM,

    For a tutorial and some refresher info, see the link(Database Planning and Design) in my signature; and within that link
    -RogersAccessLibrary tutorials will lead you through the process (and has answers)
    -Dr. Widom videos on tables design.

    Good luck.

  4. #4
    Join Date
    Apr 2017
    Posts
    1,679
    About form - subform relations: you have to set LinkMasterFields and LinkChildFields properties for subform (NB! For subform containing order details form! You have orders form and order details form. In orders form you have a subform, and order details form is source of this subform.). The link may be defined by one pair of key values (e.g. primary key OrderID of orders table and OrderDetails ID of order details table), or by several key pairs. Child keys must always be table fields, parent keys can be table fields, or controls in parent form. In child form, controls with child key fields as source must always not editable for users, or (even better option) hidden. Whenever a new record is added into suborm, all child key values are populated from parent keys.

    About your question about seeing linked info from related tables: it is all about defining relationships. Follow links provided by Orange!

    About behaving of forum: It all started after forum was closed for couple of hours some days ago I think. Currently at home I have no problems, but at work I have them a lot!
    1. Sometimes after every character I type a carriage return is entered;
    2. All time about half of keystrokes are not registered. I have to edit practically every word. For some character I have to type it 3 - 4 times to get it inserted;
    3. Copy - paste through Ctrl+C/Ctrl+V doesn't work - but it does work from dropdown menu;
    4. Forum is jerking all times. It looks, like text is after every second or so returned to some starting position. E.g. when I try to scroll the forum to read earlier messages, I almost immediately am returned to post I am entering. But when I can click on some older post, then after that I can scroll the forum.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    I started a thread on the IE issues so more info at https://www.accessforums.net/showthread.php?t=77163
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    wolfm is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Dec 2013
    Posts
    93
    Point well taken about not running lookups on tables, but off queries. Will create queries for lookups.
    I left some tables off this example, to make it simpler. Products table got left out.
    My larger database is being made for warehouse ordering,fulfillment and shipping, to replace spreadsheets.
    Thanks, as always for your help!

  7. #7
    wolfm is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Dec 2013
    Posts
    93
    Quote Originally Posted by orange View Post
    WolfM,

    For a tutorial and some refresher info, see the link(Database Planning and Design) in my signature; and within that link
    -RogersAccessLibrary tutorials will lead you through the process (and has answers)
    -Dr. Widom videos on tables design.

    Good luck.
    Thanks for all the info! I will save it in my resources page!

  8. #8
    wolfm is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Dec 2013
    Posts
    93
    Thanks Arvil! I will keep your explanation of parent/child fields. That should help!

  9. #9
    wolfm is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Dec 2013
    Posts
    93
    Thanks all! Run lookups from queries, use relationships to link major links and use queries to bring info in tables together, consider linked fields. Also, plan ahead and write out a plan before starting in Access. All great advice!

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

Similar Threads

  1. Newbie Troubles
    By Deciel in forum Programming
    Replies: 1
    Last Post: 02-05-2014, 03:45 AM
  2. SQL Troubles
    By dccjr in forum Programming
    Replies: 5
    Last Post: 10-10-2013, 07:58 PM
  3. Subreport Keep Together troubles
    By chris.williams in forum Reports
    Replies: 1
    Last Post: 09-07-2012, 12:29 PM
  4. Table Relationship Troubles
    By GSTAR in forum Access
    Replies: 5
    Last Post: 07-09-2012, 11:34 PM
  5. Running Sum Troubles
    By royalrochelle in forum Reports
    Replies: 2
    Last Post: 09-10-2011, 05:13 AM

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