Results 1 to 6 of 6
  1. #1
    mnjohn is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jul 2017
    Posts
    16

    Arrow table relationship

    hi everyone

    i create 3 tables as shown in pictures.


    now after creating relationship.. when i go to my main table that is ( Name table ) and click on + sign of any record it ask me to choose what subsheet you want to show result.
    so please tell me how to avoid such errors.
    thanks

    1...
    Click image for larger version. 

Name:	123.png 
Views:	11 
Size:	10.4 KB 
ID:	29462


    2.
    Click image for larger version. 

Name:	125.png 
Views:	11 
Size:	20.9 KB 
ID:	29465

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    I recommend you build forms and not work directly with tables and queries for data entry/edit.
    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
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    it is not an error, your names table has two related tables. A table can only have one subdatasheet - Access is asking which table you want to populate it with. If you want to fix it, go into the names table design, in the ribbon, click on properties, go to Subdatasheet name and select the table you want.

    Appreciate you are probably still investigating however, agree with June. You would be much better off using a form with subforms. Users should never work with tables (or queries) directly. Subdatasheets are OK for development purposes, but remove them before your application goes live - once the db starts to fill with data it will have an impact on performance.

    Incidentally your names and presents tables have fields with the same names - having the same name will confuse Access at some point. Recommend you prefix table names with 'tbl' or similar. Also, hyphens (or any non alpha numeric character) in field and table names are not a good idea. Again, they could confuse access down the line (it will try to deduct 'salary' from 'basic').

    Another tip is to not name a field 'ID', use something more meaningful like NamesID, PresentsID etc. As you get into it, you will get confused around which ID is being referenced

  4. #4
    mnjohn is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jul 2017
    Posts
    16
    thanks both of you..
    i realize some mistakes....... but i want to see both subdatasheet records in their main relational fields that are in ( names tables ).

  5. #5
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    in that case you will need to use a mainform with two subforms. Mainform would have the recordsource of table names, each subform the recordsource of presents and basicsalary respectively. You have enforced referential integrity so the two subforms should each have their linkchild and linkmaster properties set. But if not for some reason, the subform for presnts will have a linkchild value of pnames and linkmaster of ID and for the basicsalary a linkchild value of namesid and linkmaster of ID

  6. #6
    mnjohn is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jul 2017
    Posts
    16
    great......... thanks...

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

Similar Threads

  1. I need help to relationship in Table
    By Mehvan in forum Database Design
    Replies: 2
    Last Post: 09-25-2016, 06:06 AM
  2. Which table should have this relationship?
    By MickFlanagen in forum Database Design
    Replies: 14
    Last Post: 05-16-2013, 02:18 PM
  3. Table Relationship Help
    By JoshLewis in forum Database Design
    Replies: 1
    Last Post: 04-08-2013, 10:55 AM
  4. Replies: 2
    Last Post: 04-08-2012, 03:04 PM
  5. Relationship Table Help
    By Nick F in forum Database Design
    Replies: 5
    Last Post: 10-10-2011, 01:28 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