Connecting Tech Pros Worldwide Forums | Help | Site Map

Distinct selection

Newbie
 
Join Date: Jan 2008
Posts: 12
#1: Mar 11 '08
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?

Moderator
 
Join Date: Feb 2008
Location: Beauly, near Inverness, Scotland
Posts: 1,576
#2: Mar 12 '08

re: Distinct selection


Quote:

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
Newbie
 
Join Date: Jan 2008
Posts: 12
#3: Mar 12 '08

re: Distinct selection


If the combo is bound, I couldn't change the value. So how could I allow changes to the combobox?
Moderator
 
Join Date: Feb 2008
Location: Beauly, near Inverness, Scotland
Posts: 1,576
#4: Mar 12 '08

re: Distinct selection


Quote:

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
Reply