Distinct selection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mashimaro
    New Member
    • Jan 2008
    • 12

    Distinct selection

    Hi,

    I have a form that bound to a query. The form shows the records in tabular view. But I wish to allow changes for some fields, hence I made those fields as combobox. The problem is if I change the value in row 1 (select the combobox of row1), all rows are being changed as well. How do I make each rows independent of other rows?
  • Stewart Ross
    Recognized Expert Moderator Specialist
    • Feb 2008
    • 2545

    #2
    Originally posted by mashimaro
    Hi,

    I have a form that bound to a query. The form shows the records in tabular view. But I wish to allow changes for some fields, hence I made those fields as combobox. The problem is if I change the value in row 1 (select the combobox of row1), all rows are being changed as well. How do I make each rows independent of other rows?
    Hi mashimaro. It sounds like the combo box is not bound to one of the underlying fields of the form (it should be bound to the one you replaced in putting it on the form). Tabular forms repeat the same set of controls, so if the values are not bound you get the same thing repeated on each row. If you used the Access wizard to build the combo it is easy to forget to assign the value to the right field, so this would be the first thing to check I think.

    If the combo is unbound its control source property will be blank.

    -Stewart

    Comment

    • mashimaro
      New Member
      • Jan 2008
      • 12

      #3
      If the combo is bound, I couldn't change the value. So how could I allow changes to the combobox?

      Comment

      • Stewart Ross
        Recognized Expert Moderator Specialist
        • Feb 2008
        • 2545

        #4
        Originally posted by mashimaro
        If the combo is bound, I couldn't change the value. So how could I allow changes to the combobox?
        Hi. A bound control is simply one whose control source is a field on the underlying query or table for your form. Changes made to bound controls cause changes to the underlying field of the table, as long as (1) the value entered is appropriate for that field, and (2) the control and the query or table are updatable.

        The use of the combo box as such cannot itself cause an update issue, but returning a list value that does not match what the underlying field is set to take could do so.

        You should check that your combo box is returning an appropriate value for the field to which it is bound as your first step. There are examples of the use of combo boxes in Microsoft's exemplar Northwind database which comes with Access.

        -Stewart

        Comment

        Working...