Results 1 to 3 of 3
  1. #1
    qvqv is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2021
    Posts
    18

    Look Ups

    Hi



    If I have a lookup table which has 2 fields, a 'Primary Key' and a data field.

    In the main table it stores the 'Primary Key' and displays it.

    When I create a form, how do I get the form to display the data field and not the 'Primary Key' ?

    Many thanks

  2. #2
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    The simplest way is to use a combo box. Set the control source to the PK.

    Bring in the PK and the Text Data as the two columns, then in the column widths set them to 0;5

    This will store the PK as the data but only display the text data.
    Make sure you set the number of columns to 2 .
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    5,008
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

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

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