Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Posts
    61

    Unanswered: simple form question

    I have a form on which i have a combox to enable me to select a value from a certain table, which works fine. However what i want is another box (don't know which type i need) that whenever i select a value in my combobox shows me the value that is in a different column from the same record. So for instance i select someones name in the combobox and his adress shows up in the other box. It should be relatively easy i guess but i can't seem to figure it out. Please note that it has to be in a different box since i need the values from both boxes as input for other things.


    I made a little progress just now. I have added a list box which gives me te value of the second column. However the value in the list box doesn't get updated when i select a different value in the combobox. I have to close and reopen the form to make that happen. Does anybody know how to get that fixed??
    Last edited by Kabuki_jo; 07-15-04 at 06:04.
    Nobody dies a virgin because life screws us all!

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    It sounds like the second be should be a basic text box on a bound form.

    Bind your form to the table you wish to work with, set it's record source = "SELECT * FROM yourTable WHERE yourId = forms!yourForm!yourCombo"

    Then populate a two column combo box with ID, otherField (otherField being what you want the user to see). Set the column widths to 0";1";. Basically this means the user will see a list of names or what have you, but attached to each name is the primary key for that record. The form is set to bring up information about whatever primary key is set in the combo box, when you change the combo box, you change the form.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Oct 2003
    Posts
    61
    Quote Originally Posted by Teddy
    It sounds like the second be should be a basic text box on a bound form.

    Bind your form to the table you wish to work with, set it's record source = "SELECT * FROM yourTable WHERE yourId = forms!yourForm!yourCombo"

    Then populate a two column combo box with ID, otherField (otherField being what you want the user to see). Set the column widths to 0";1";. Basically this means the user will see a list of names or what have you, but attached to each name is the primary key for that record. The form is set to bring up information about whatever primary key is set in the combo box, when you change the combo box, you change the form.

    I'm sorry but this will not do the trick. Like i said i want it in separate boxes. A combobox to select and a text box which will be populated with a column of the selected record.
    Nobody dies a virgin because life screws us all!

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Do you understand the concept of bound controls?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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