Results 1 to 11 of 11
  1. #1
    jaryszek is offline Expert
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2016
    Posts
    568

    Simple problem (for you) with relationships

    Hi Guys,



    I attachment please see sample database.

    I have 3 tables:
    Click image for larger version. 

Name:	relationship.png 
Views:	25 
Size:	9.8 KB 
ID:	31197

    For one Korekty_Id i can have multiple money.
    So 1 correction can have multiple money fields.

    And for each money field I can have only 1 status name.


    I did the query1 (based on table's relationships) and result are like below:

    Click image for larger version. 

Name:	Qry1Result.png 
Views:	23 
Size:	12.8 KB 
ID:	31198


    I am changing status name from Status1 to for example NewStatus in first record also third record will change:

    Click image for larger version. 

Name:	changestatus.png 
Views:	23 
Size:	12.5 KB 
ID:	31199

    This it is ok, because i am changing status name for the same Status_ID.

    Problem here: want to change each record status separately.

    So if i change NewStatus in first record for Status "Test1" change should affect only first record, not others (not also third record).

    Please help with this.

    I can put Status_name field into tbl_dates but what about Section_name - thanks to it i filtering statuses to adequate user.

    Thank you for you tips.
    Jacek
    Attached Files Attached Files

  2. #2
    jaryszek is offline Expert
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2016
    Posts
    568
    If i add Status_name into tbl_dates i do not have dictionary table and i do not know how to give user possibility to choose adequate Status_name.

    Example:

    Status_name is in the tbl_Dates.
    And now how to give user possibility to choose Status name? From what table?
    It will be 3 status_names for 2 status_section.

    Now user "ljar01" belongs to Status_section for example "section1".
    And user on form can see within combobox only statuses filtered for section1.

    So without table tbl_Status i do not know how to create combobox for user with specific status_section.

    Do you understand me?

    Jacek

  3. #3
    jaryszek is offline Expert
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2016
    Posts
    568
    I updated my database to show you what exactly i mean.

    If you open frmCorrections you can see that there is an combobox for choosing Status_name.
    This combobox is based on section_name attached to user_login.

    so here ljar_01 is attached to section1 so combobox is showing only section1 records.

    I want to have form like that but as in my first post - status attached for each ID_dates.
    So each ID_Dates has one status but with possibility to use also combobox like in attachment.

    How can i do this?

    Pleasy friends,
    help me
    Warm regards,
    Jacek Antek
    Attached Files Attached Files

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Jacek,

    In 5 lines or less of plain simple English --tell us what you are trying to accomplish. No database jargon.

    korekty ==corection but correction of what?

  5. #5
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,741
    For every unique combination of field1 and status_name, you will need a record in tbl_dates to link them.
    Last edited by davegri; 11-10-2017 at 11:52 AM. Reason: clarif

  6. #6
    jaryszek is offline Expert
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2016
    Posts
    568
    Hi orange,

    glad that you are back !
    Thank you!

    Topic where i am writing about my model is here:
    https://www.accessforums.net/showthread.php?t=68685

    and here:
    https://www.accessforums.net/showthread.php?t=67485
    (in post 14$ is a definition of correction)

    It is the same database and here i want to simplify it in order to have quick respond.

    Additionally, in 5 lines explanation:
    1. Each emplooyee has his own document in paper which has to be corrected.
    2. Now each document can have a few different amounts of money for correction for different dates.
    For example document1 can be within 2 dates: 2015-01 and 2015-02 and amount of money can be different between them.
    3. And technically now: each change of date or amount has to have also possibility to change status for it.
    And now i am trying to achieve this.

    Thank you davegri,
    what you mean by link field between these 2 tables? Tbl_dates are now linked table and this is not working like i want to.

    Thank for helping,
    Jacek Antek

  7. #7
    jaryszek is offline Expert
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2016
    Posts
    568
    Anybody ?



    Jacek

  8. #8
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,741
    jaryszek_Database641.zip
    Added frm_Dates.

    Not sure if this meets requirements - I'm having trouble understanding your specs...

  9. #9
    jaryszek is offline Expert
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2016
    Posts
    568
    Thank you very much davegri,

    Hmm your solution give me a lot to thinking.

    Click image for larger version. 

Name:	Przechwytywanie2.JPG 
Views:	12 
Size:	67.3 KB 
ID:	31227

    If i will build a split form from tbl_Dates I can give user possibility to change status for each record only.

    And this is my purpose - to change each status for each record by user.

    Not to as you can see in Qry1 - if i am changing status in first record also other records with the same Status_name_ID_FK will be changed:
    Click image for larger version. 

Name:	Przechwytywanie.JPG 
Views:	12 
Size:	42.3 KB 
ID:	31228
    I will check your solution tomorrow at work and let you know what i will achieve.

    Best wishes,
    Jacek

  10. #10
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    jacek,

    What exactly is your tbl_Dates? It contains info re Status, Correction and Money. I think it could b named something more relevant to your business. eg: CorrectionDetails? CorrectionAdjustments? I don't think Dates is a meaningful name--but it's your database.

    Also field1 means nothing to a user or anyone trying to offer assistance to you. Also, based on your previous pots, I see no reference to Client. What happened to Client?

    For clarity and context, what is status of your overall project?

  11. #11
    jaryszek is offline Expert
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2016
    Posts
    568
    Hi Guys!

    Your method is working fine ! thank you !

    It was very simple but i did not see the clear solution.

    orange,

    Here i have only outline of my model.
    Yes i will be changing names later. and you have right - maybe i should change the names.

    field1 one was only for my model here.

    And my project status.

    I did the relationships and first form to inputing data. I have to add exporting data forms and prepare reports forms.
    End of project is set up on 2th of december but i suppose i will have a little delay.

    I want to help you and other Guys for helping me, if not you i would not finish my project.

    Best Wishes
    and all the best for you,
    Jacek

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

Similar Threads

  1. Relationships problem
    By Helpmepls in forum Access
    Replies: 11
    Last Post: 11-10-2017, 02:06 PM
  2. Replies: 23
    Last Post: 08-01-2017, 06:14 AM
  3. table relationships problem
    By sichilaba in forum Database Design
    Replies: 10
    Last Post: 12-18-2014, 07:04 AM
  4. Relationships problem
    By cedricleo in forum Database Design
    Replies: 3
    Last Post: 09-21-2011, 05:10 AM
  5. Very simple problem
    By alexc333 in forum Queries
    Replies: 8
    Last Post: 07-21-2011, 07:35 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