Results 1 to 12 of 12
  1. #1
    StephenJ is offline Novice
    Windows 10 Office 365
    Join Date
    Apr 2025
    Posts
    5

    Question Combo Box on Form; Referenced field value rather than ID number

    I have 3 tables in Access; Table-1, Table-2, Table-3

    Table-1 -> Table-2 One to Many
    When I build Form-2 for data entry to Table-2 my Combo Box field (built by wizard) displays the actual value (from Table-1) instead of the PK from Table-1, as expected.

    Table-2 -> Table-3 One to Many
    When I create Form-3 (using same steps used to create Form-2) for data entry to Table-3 my Combo Box field will display the PK number rather than the value. When I run the query for the Combo Box field (in from design view) The result is the actual value but still get ID number on form Combo Box list.

    On Form-3 how do I get the value to display in my Combo Box rather than the ID number?

    The Combo Box field on Form-3 is the same field referenced in the One to Many from Table-1 -> Table-2
    Last edited by StephenJ; 04-24-2025 at 08:43 AM. Reason: Additional info

  2. #2
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    It's normal for a bound combo to have 2 columns in these cases. 1st is bound to pk (usually autonumber) and its width is set to zero. The second column displays the values associated with the pk field. The value that is stored in the table (say when you choose "apples") is the pk value for apples in the underlying table record. The order that the table fields are assigned to the columns is the same order as the table or query fields when reading from left to right - at least in most of the world.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    StephenJ is offline Novice
    Windows 10 Office 365
    Join Date
    Apr 2025
    Posts
    5
    Understood
    But why can't I get my combo on my form for data entry to Table-3 display the same as the Combo on form used for data entry for Table-2. The Combo on Form-3 is bound to the field in Table-2 which is the same field referenced (on the Many side) of Table-1

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Are you using table lookups?
    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

  5. #5
    StephenJ is offline Novice
    Windows 10 Office 365
    Join Date
    Apr 2025
    Posts
    5
    Quote Originally Posted by Welshgasman View Post
    Are you using table lookups?
    Yes, if you mean using the Lookup Wizard

  6. #6
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    So in table design you chose a field and set its property to be a lookup field? Then that is likely your issue. Lookup fields are usually avoided by experienced db designers. See the 5th link from the bottom in this thread: https://www.accessforums.net/showthr...773#post521773
    IIRC, it is possible to get the value instead of the pk ID in a query if you use the .Value property, although you may want to rethink using lookup fields (not the same as a lookup table).
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Quote Originally Posted by StephenJ View Post
    Yes, if you mean using the Lookup Wizard
    That will be why then, as really the field holds the PK, not the display value, which is as it should be, but confusing when using table lookups, as it hides that fact.
    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

  8. #8
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,821
    Hi
    If you can upload a zipped copy of your database I will show you how it should be constructed.

  9. #9
    StephenJ is offline Novice
    Windows 10 Office 365
    Join Date
    Apr 2025
    Posts
    5
    Quote Originally Posted by mike60smart View Post
    Hi
    If you can upload a zipped copy of your database I will show you how it should be constructed.
    Uploaded database
    Please see DM, thanks
    Attached Files Attached Files

  10. #10
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,821
    Hi Stephen

    You should not be using Lookups in table field names.

    See the frmReloadAmmo
    Attached Files Attached Files

  11. #11
    StephenJ is offline Novice
    Windows 10 Office 365
    Join Date
    Apr 2025
    Posts
    5
    Quote Originally Posted by mike60smart View Post
    Hi Stephen

    You should not be using Lookups in table field names.

    See the frmReloadAmmo
    Thank you for the learning experience, greatly appreciated

  12. #12
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,821

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

Similar Threads

  1. Replies: 6
    Last Post: 08-19-2020, 08:50 PM
  2. Replies: 1
    Last Post: 03-05-2018, 10:21 AM
  3. Replies: 5
    Last Post: 04-08-2017, 07:50 AM
  4. Replies: 7
    Last Post: 09-04-2015, 11:55 AM
  5. Adding Field Value Rather Than ID Value
    By wes9659 in forum Forms
    Replies: 2
    Last Post: 07-31-2014, 01:25 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