Results 1 to 7 of 7
  1. #1
    cesarone82 is offline Novice
    Windows 11 Access 2016
    Join Date
    Jun 2009
    Posts
    25

    Combo box in form, showing not only record value but also text based on a correspondence table

    Hi,

    I was successful in creating a combo box that has a list of values based on another table (code , description) this is when i chose the box to select the value to input.
    The problem is that when the combo box is not selected i can only see the (code) while i d like to see both of the exactly as when i ahve the combo box selected



    Click image for larger version. 

Name:	unselected.PNG 
Views:	14 
Size:	9.0 KB 
ID:	51109 Click image for larger version. 

Name:	unselected.PNG 
Views:	14 
Size:	13.0 KB 
ID:	51111

    It is the frm_projclients in the attached databaseProgetti.zip

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    You generally store the first value and show the second. Least that is how I do it, with the first field being the bound field.
    User should not care what the bound field is, but what it represents, which is the descriptive value.

    Start looking at YouTube for videos about Access, plenty on there which are very helpful.

    https://www.youtube.com/results?sear...=access+combos and one that is pertinent https://www.youtube.com/watch?v=yCLAsFbQEfg
    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

  3. #3
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2019
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    It is the frm_projclients in the attached databaseProgetti.zip
    There is no form with that name in the file
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Quote Originally Posted by Bob Fitz View Post
    There is no form with that name in the file
    Probably tbl_projclienti Bob?
    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
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2019
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Quote Originally Posted by Welshgasman View Post
    Probably tbl_projclienti Bob?
    Well that's what I thought too, but I can't see a combo on that form
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  6. #6
    cesarone82 is offline Novice
    Windows 11 Access 2016
    Join Date
    Jun 2009
    Posts
    25

  7. #7
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,566
    Hi
    In tblProjectProf I changed the field Type to be ProjTypeID
    I made the field a textbox and NOT a Lookup Field (Google the Evils of Lookup Fields in Access Tables)

    In tblProfType I added a field named ProjectTypeID - PK - Autonumber
    Removed the field Type as it was just a Number DataType

    I then linked the two table on ProjTypeID

    It now works as it should
    Attached Files Attached Files
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

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

Similar Threads

  1. Replies: 4
    Last Post: 02-01-2023, 03:17 PM
  2. form showing list based on values of combo boxes
    By Khalil Handal in forum Forms
    Replies: 6
    Last Post: 08-06-2021, 04:13 AM
  3. Replies: 14
    Last Post: 05-26-2019, 05:30 PM
  4. Form based on its combo box & text boxes
    By LonghronJ in forum Queries
    Replies: 7
    Last Post: 11-02-2016, 10:40 AM
  5. Replies: 8
    Last Post: 11-20-2013, 01:03 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