Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2004
    Posts
    9

    Unanswered: Combo Box problems (urgent)

    O.K.

    I have been creating Access DB for about a year now, & constantly update/change them to suit the needs of our engineering group. Now I have come upon a problem with Combo Boxes...Please Help!

    In the database there are two tables, one containing engineering information (i.e. FirstName, LastName, Dept, etc...) and another tabel that contains information intheir current sponsorships. I want a combo box used to pick the engineer when entering data. However, when I do this I only get one name after update. This poses a problem. If I give the bound control to column one I get last name (more then one Trevino, or Lewis then we can not determine which one we originaly chose), and if I give the bound control to coumn two I get the first name (more then one Chris, or Charles...same problem). So I copy the combo box and change it to a text box, and place it next to the combo box, THIS WORKED. Every time I update according to last name the text box automaticaly updates to show the first name. But this is inefficient, and does not give the desired results to the table (in which the data is stored in a field called "sponsor").

    I want the Combo Box (one box) to show a pull down list of both first and last name (pulled from the engineer table), and update to the sponsor field in the sponsor table both first and last name.

    Please help fast, I have been working on this for about 3 days solid & have not come up with a solution. I am becomming dalerious.

    Thank you in advance.

    -Chris

  2. #2
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Question Re: Combo Box problems (urgent)

    Originally posted by christo_lew
    O.K.

    I have been creating Access DB for about a year now, & constantly update/change them to suit the needs of our engineering group. Now I have come upon a problem with Combo Boxes...Please Help!

    In the database there are two tables, one containing engineering information (i.e. FirstName, LastName, Dept, etc...) and another tabel that contains information intheir current sponsorships. I want a combo box used to pick the engineer when entering data. However, when I do this I only get one name after update. This poses a problem. If I give the bound control to column one I get last name (more then one Trevino, or Lewis then we can not determine which one we originaly chose), and if I give the bound control to coumn two I get the first name (more then one Chris, or Charles...same problem). So I copy the combo box and change it to a text box, and place it next to the combo box, THIS WORKED. Every time I update according to last name the text box automaticaly updates to show the first name. But this is inefficient, and does not give the desired results to the table (in which the data is stored in a field called "sponsor").

    I want the Combo Box (one box) to show a pull down list of both first and last name (pulled from the engineer table), and update to the sponsor field in the sponsor table both first and last name.

    Please help fast, I have been working on this for about 3 days solid & have not come up with a solution. I am becomming dalerious.

    Thank you in advance.

    -Chris
    Do you want to put both the first and last name into one field in the Sponsor table?

    I'm a little unclear as to how the name info is getting into the sponsor table. Is it a field(s) on your form or are you adding it with programming code?
    Gregg


    DAO, ADO, SQL, Automation and anything else I can pick up.

  3. #3
    Join Date
    Sep 2003
    Location
    MN US
    Posts
    313

    Re: Combo Box problems (urgent)

    Chris,
    I think I understand your question correctly. I have a form with a similar situation. This is how I solved it.

    I created a seperate query which made the data look like what I wanted in my combo box. I concatenated First and Last names in the second column of the query. (First column is the ID field)
    So CatName: [Last] & " " & [First]

    I set the RowSource of the Combo Box to that query.
    Then Column Widths to 0"; 2" (where the first column was the bound column)

    There are probably better solutions, but this worked for me.

    HTH,
    CP

  4. #4
    Join Date
    Feb 2004
    Posts
    9
    I do want both First & Last name to be populated into the Sponsors table (field= strSponsor) from table Engineers (fields= strFirstName, strLastName)

    I want the user to be able to use a combo box so that the format will always be the same, and the user will not have to type the information in (eliminating risk of mis-typed/spelled names). However, I can not get the combo box to display both first and last name (inside the box) after update, nor both first and last name in the table Sponsors (field=strSponsor).

    I may be loosing my mind by now.

  5. #5
    Join Date
    Feb 2004
    Posts
    9
    Thanks CP....

    That works just fine for what I need.

    ahhhhh....what a relief.

  6. #6
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Originally posted by christo_lew
    I do want both First & Last name to be populated into the Sponsors table (field= strSponsor) from table Engineers (fields= strFirstName, strLastName)

    I want the user to be able to use a combo box so that the format will always be the same, and the user will not have to type the information in (eliminating risk of mis-typed/spelled names). However, I can not get the combo box to display both first and last name (inside the box) after update, nor both first and last name in the table Sponsors (field=strSponsor).

    I may be loosing my mind by now.
    If you make the firstname or lastname a visible column in the combobox the user can at least see the person selected even if only the bound column displays with the after update ... What about a label displaying both the first and last name after making a selection?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •