Results 1 to 11 of 11
  1. #1
    fabiobarreto10 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    169

    text box to display the name of a one to many relationship in a combo

    Gentlemen,


    I have a table named adviser, with a one to many relationship with the company table.
    I have a form with a combo that shows all the companies.
    How do I put a textbox, the combo update with the company shows the advisor of the respective company.


    Thank you.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Is this what you're after?

    http://www.baldyweb.com/Autofill.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    fabiobarreto10 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    169
    Thanks for responding,
    I just need to show in the textbox the name of the officer, referring to the company name in the combobox.
    The ratio is an advisor to many companies.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    That technique should work, presuming you can include the name of the officer in the combo's row source.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    fabiobarreto10 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    169
    Thank you.
    I put on the event after updating the combo:
    Me.TextBox= Me.combEmpresa.Column (2).

    Ok, I visualize the id of the assessor.

    how do I see the name?

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Is the name in the row source? It should be, and you refer to that column.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    fabiobarreto10 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    169
    I will elaborate on.

    Analyst I have a table with these fields:


    idAnalista
    NomeDoAnalista

    I have another table called company, with these fields:

    idEmpresa
    Company Name
    idAnalista

    I have a relationship of one analyst, for many companies.

    After upgrading the company combo, how do I see the name of their company analyst.

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Your row source should join the tables together. Can you post the db?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    fabiobarreto10 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    169
    ok, I'm posting the db.


    Just to be clear, in the form fFiltros I have three combos.


    I'll put an option in the bank to get two combos.


    ie filter by advisor. and filter by company.


    when you filter by company. after updating the combo company, shows the textbox just below the name of the officer of their company.



    Thank you. http://dl.dropbox.com/u/53793430/TES...DO PRODUTO.zip

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    I should have specified to post it here. I'm not comfortable downloading from unknown sites.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  11. #11
    fabiobarreto10 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    169
    as by sending the db forum?
    dropbox is not known?

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

Similar Threads

  1. Replies: 4
    Last Post: 08-16-2011, 05:54 PM
  2. Text/Number Relationship Problem
    By Luke in forum Access
    Replies: 4
    Last Post: 07-07-2011, 11:29 AM
  3. Display field as text box
    By thekruser in forum Forms
    Replies: 5
    Last Post: 08-31-2010, 10:37 AM
  4. Replies: 2
    Last Post: 10-09-2009, 07:34 AM
  5. Access Relationship Display Question
    By dayrinni in forum Access
    Replies: 3
    Last Post: 02-05-2006, 11:16 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