Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Getting values from a combobox into other textboxes

Discussion in 'Information Technology' started by default105, Jul 28, 2006.

  1. default105

    default105
    Expand Collapse
    Guest

    This is just for my knowledge type of question.

    If I have a combo box that I am using to retrieve a value and choose to have
    5 field it is retrieving and only have it show one in both the dropdown and
    the box with the other lengths set to zero. Now if I have four other unbound
    textboxes on the form that I want to contain the each of the other values
    respectively, what are the ways to do this.

    I realize that you can force the values using =combobox.column(1) 2 3 4 and
    get the the values in each of the textboxes but I have also read that you can
    do it also with a query but I am at a loss on how to do it. And is there any
    other ways.

    Thanks for the info.

    Pete
     
  2. Loading...


  3. Ken Sheridan

    Ken Sheridan
    Expand Collapse
    Guest

    Pete:

    You can base the form on a query which includes the referenced table, and
    bind controls in the form to that table. Take the following simple example
    from the sample Northwind database:

    SELECT [Order Details].OrderID, [Order Details].ProductID,
    Products.ProductName, Products.SupplierID,
    Products.CategoryID, Products.QuantityPerUnit
    FROM Products INNER JOIN [Order Details]
    ON Products.ProductID = [Order Details].ProductID;

    A form bound to this query with a combo box bound to the foreign key
    ProductID column in the Order Details table would populate the controls bound
    to the columns from the Products table with the values for the selected
    ProductID in the combo box. Unlike unbound computed controls which get their
    values by referencing the Column property of the combo box control, however,
    the values of the columns from the Products table could be edited in this
    case.

    Ken Sheridan
    Stafford, England

    "default105" wrote:

    > This is just for my knowledge type of question.
    >
    > If I have a combo box that I am using to retrieve a value and choose to have
    > 5 field it is retrieving and only have it show one in both the dropdown and
    > the box with the other lengths set to zero. Now if I have four other unbound
    > textboxes on the form that I want to contain the each of the other values
    > respectively, what are the ways to do this.
    >
    > I realize that you can force the values using =combobox.column(1) 2 3 4 and
    > get the the values in each of the textboxes but I have also read that you can
    > do it also with a query but I am at a loss on how to do it. And is there any
    > other ways.
    >
    > Thanks for the info.
    >
    > Pete
     

Share This Page