Results 1 to 8 of 8
  1. #1
    Peter Simpson is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Oct 2017
    Location
    South Africa
    Posts
    83

    Form fields


    I have a lookup form where I enter a lookup value, Let us say 16, from a combo box

    On entering 16, 7 other text boxes populate showing me the information I need to see.

    The problem I have is one of the fields is SupplierID_Fk which is a number representation of 7. I would like to see the supplier's name instead of the foreign key number. Can I insert another text box that links the FK to the Supplier table to show the supplier name?

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    suggest change the textbox to a combobox and populate the rowsource with the fields you want to display. Otherwise you can change the textbox control source to a dlookup (but then it will not be updateable, if that matters)

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Here's a short explanation of this approach:

    http://www.baldyweb.com/Autofill.htm

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  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,521
    Quote Originally Posted by Missinglinq View Post
    Here's a shorty explanation of this approach:
    Shorty?!? Who you calling shorty?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Well...at least I didn't call you 'baldy!'

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  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,521
    Sadly, that nickname is more and more appropriate.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    Seems the controls are bound so a combo seems risky to me. If a fk is involved then likely a query is behind the form, populating 7 controls after a combo value is chosen. Then why not just add the missing field, or replace the fk field altogether. Possibly I'm missing the point when I say that I don't get why one would use a combo to simply display a missing field.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  8. #8
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by pbaldy View Post
    Sadly, that nickname is more and more appropriate.
    You and me, both! I'm 3 inches shorter, than when I graduated from high school, and that 3 inches apparently has moved into my forehead...shoving my hairline that much further back!

    Micron...on rereading the OP, not really sure what he's asking...whether he's already using a Combobox to populate these fields, with all of them being in the Combobox' source, or whether he's retrieving an existing Record using it, and only wants the supplier's name to appear in the cbo, instead of the SupplierID_Fk.

    Of course, it would probably help if the OP would respond to our posts.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Replies: 3
    Last Post: 12-02-2017, 02:04 PM
  2. Replies: 1
    Last Post: 10-11-2013, 10:05 PM
  3. Replies: 1
    Last Post: 06-20-2013, 05:06 PM
  4. Replies: 8
    Last Post: 08-02-2012, 10:50 AM
  5. Replies: 5
    Last Post: 02-27-2012, 02:05 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