Results 1 to 8 of 8
  1. #1
    Juan4412 is offline Competent Performer
    Windows 7 Access 2002
    Join Date
    Dec 2010
    Posts
    209

    Combo box Help


    My form has a combo box with the cbobox pulling values from a table for a dropdown list, it set up to return the dropdown option selected to a table. My problem is on the table it is showing the access auto generated id, instead of the salutaion (ie Mr. Mrs. Misses etc.) What need to change to make this take place?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Generally speaking, that's exactly what you want to happen. You store the key in related tables, not the text (that's what it's for). If you really want to store the text, change the bound column of the combo, or the rowsource (to eliminate the id field). But then, why bother having an id field?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Juan4412 is offline Competent Performer
    Windows 7 Access 2002
    Join Date
    Dec 2010
    Posts
    209
    I guess I do not really need to have the id field, I just created a seperate table so that the user could have a drop down menu to choose from, and then bound that combo box to my main table so that the salutation would appear before the first name. Will simply eliminating the key allow the salutation to be returned to the field on my table?

  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,640
    As I mentioned, all you really need to do is change the bound column property of the combo or the row source property. If you get rid of the field, you'll have to change the row source anyway.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Juan4412 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2010
    Posts
    209
    Can you tell me my error? I add two records of sample, and the table show wheer number not salutation selected.

  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,640
    I did, twice. The row source is:

    SELECT TblSalutations.ID, TblSalutations.Salutations
    FROM TblSalutations;

    and the bound column is 1, which is the ID. Change the bound column to 2
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    jo15765's Avatar
    jo15765 is offline Expert
    Windows 7 Access 2000
    Join Date
    Nov 2010
    Location
    6 Feet Under
    Posts
    672
    As pbaldy has said, right click on your combo box and choose properties. When the properties window displays from there you want to choose the data tab.

    On that tab the row source is the 2nd from the top, and place this as the row source --- SELECT TblSalutations.ID, TblSalutations.Salutations
    FROM TblSalutations;


    Just below the row source is your bound column. You have it set as 1, which is your "ID" and that is why it is returning a numerical value to your table. If you change the bound column to 2 it will then return the salutation that is selected.

    To explain further, let's break down your row source....SELECT TblSalutations.ID, TblSalutations.Salutations
    FROM TblSalutations;

    Your first row source is ID from TblSalutations, so the bound column of 1 would return the data in the ID field. When you change the bound column to 2 it will then return the data in the Salutations field from TblSalutations.

    Make sense?

  8. #8
    Juan4412 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2010
    Posts
    209
    Thank both of you for your assistance. I am still very new to access, and did not understand what baldy was meaning, that is why i uploaded a sample. Jo thank you for the detailed in structions as well.

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

Similar Threads

  1. Replies: 4
    Last Post: 01-24-2011, 07:11 PM
  2. Replies: 5
    Last Post: 01-02-2011, 10:09 AM
  3. Replies: 1
    Last Post: 08-26-2009, 10:45 AM
  4. Replies: 3
    Last Post: 02-26-2009, 10:17 AM
  5. Replies: 0
    Last Post: 08-17-2008, 12:19 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