Results 1 to 3 of 3
  1. #1
    Nanuaraq is offline Advanced Beginner
    Windows 7 32bit Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    77

    Strange and weird problem when creating a form that shows data from a complicated table


    I have encountered a weird problem.

    I have now created quite a lot of interrelational tables. To each of my Transactions in table TblTransactions belong numerous Destinations from table TblDestinations. Each of the Destinations hold numerous Transports in TblTransports. I can see this just fine in a form I've made that shows each Transaction, the Destination related to each Transaction, and each Transport related to each Destination.

    What shows up in my form is very conveniently only the records from the related tables that correspond to the record currently shown in the parent form.

    However, I seem unable to control when this happens. I have one table of transports that is related only by one relation to the TblTransactions. In this case, the transports shown in my form is only those related to the record currently shown in the form.

    But, I also have another table of correlating transports, with slightly different data structure, and so I keep them in another table. This table have relations to both the Transaction Number and the Company Name, since there may be multiple Companies related to that one TransactionNumber. However, when I put this table in the form, I see all the records, not only the records related to the TransactionNumber currently shown in the form, How can this be?

  2. #2
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    IMHO, always create properly functioning queries before forms. In this case, it should have revealed the issue before altering form design. The problem could be that
    a) including the other table requires you to change the table joins to outer and not inner
    b) assuming tables are properly related and normalized, the table needs to be in its own query and therefore perhaps as a subform where it is related to a different query.
    c) a Totals or Union query may be the only solution (though I suspect not - just throwing out possibilities).
    d) either the first mentioned query or alternate one requires a Unique Values or Unique Records property setting.
    e) by "when I put this table in the form" you may be indicating you've created a Cartesian product but you didn't say there was a whole whack of repeating records.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    NTC is offline VIP
    Windows 10 Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    I believe the key to this is your statement "created quite a lot of interrelational tables".

    Many do not appreciate that relationships can be defined at 3 levels: table, query, form/report - and that not everything must/should be defined at the table level.

    There is also a difference between a Look Up and a Sub table type relationship. For instance selecting the State in a typical address - that is a Look Up because one always & only selects 1 value. While displaying children is a Sub table because there will be multiple children to display.

    I myself only establish Look Up relationships at the table level - because once set there it is a convenience factor in being included through out the rest of the design.

    All other 1:many Sub table relationships I establish at the query or form/report object level as appropriate to building those objects. This avoids the dilemma that you are experiencing.

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

Similar Threads

  1. weird problem with field in form
    By sk88 in forum Access
    Replies: 9
    Last Post: 01-16-2015, 09:52 PM
  2. Replies: 2
    Last Post: 10-13-2011, 08:45 AM
  3. Replies: 2
    Last Post: 11-23-2010, 11:44 AM
  4. Weird Form Control Problem
    By MWB in forum Access
    Replies: 3
    Last Post: 11-17-2010, 05:42 PM
  5. Replies: 6
    Last Post: 03-17-2010, 10:09 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