Results 1 to 4 of 4

Thread: combo box lookup

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2000
    Location
    Tennessee
    Posts
    279

    combo box lookup

    I have created a form that holds a customer's account information. One of the fields is a combo box that contains a policy description. I want one of the fields to be a combo box that contains a list of descriptions and an id for each description. I want the combo box to select the proper policy description according to that customer's policy id. When I set the form to "edit" I want the user to be able to select a new policy and save that policy's id. If possible, I would like the id to be invisible to the user. Thanks in advance.
    A cynic knows the price of everything but the value of nothing.

  2. #2
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950
    Well if it's invisible to the user, why have the id on the form at all? Store it in a db, delimited text file, whatever you want, associated with the policy.

  3. #3
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    I have looked through your post, and I see no real question..

    What is it you want exactly?

    Also, post your code here, let us help you out without playing a guessing game.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2000
    Location
    Tennessee
    Posts
    279
    The answer to the question is to bind the combo box to the dataset, setting the valuemember, datasource, and displaymember properties and then reference the valuemember I'm looking for with:

    combobox.selectedvalue = id

    This sets the combo box to display the appropriate value.
    A cynic knows the price of everything but the value of nothing.

Posting Permissions

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



Click Here to Expand Forum to Full Width