Results 1 to 4 of 4
  1. #1
    Senate is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2016
    Posts
    15

    Show data of foreign key in a form

    Hi


    I'm completely new to Access and I could use a little help now
    A have a form with some text boxes filled with data from a table. One of these text boxes contains a foreign key of another table. Now I want my form to display the data of the second table instead of the foreign key. How could I realize this?

  2. #2
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,933
    easiest (and usual) way is to use a combo control

  3. #3
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    a form is bound to a record source (although there can be unbound forms also....) and you state that your form has data "from a table". that table is the record source of the form. but a query can also be the records source. So make a query that joins those 2 tables. change the Data source of the form from the table to the query; after you do that then all the fields of table 2 are available to you to drag onto the form.

  4. #4
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,933
    not sure I agree - although does depend on what the form is used for, your suggesting is fine for a browsing form, but not for one to add or amend data - principle then is one form, one table. Start adding tables to get to the lookup data and you run the risk of the table becoming unupdateable - plus which field to update? the FK field you want to update or the data from the lookup table? Answer - lots of code to manage it

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

Similar Threads

  1. Replies: 2
    Last Post: 12-11-2015, 02:55 PM
  2. vba to show Relationships --Primary Key and Foreign Key
    By orange in forum Code Repository
    Replies: 1
    Last Post: 06-12-2015, 10:11 AM
  3. foreign key not updating data from form
    By dave100 in forum Forms
    Replies: 1
    Last Post: 08-07-2013, 10:31 PM
  4. Replies: 2
    Last Post: 04-19-2012, 11:29 AM
  5. Foreign Data
    By bmiller in forum Queries
    Replies: 0
    Last Post: 03-21-2006, 01:02 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