I am using Access 2010.
I have a combobox in a continuous form view of a subform that is based on the results of a combobox in the main form.
Everything works fine input-wise! I am able to populate all the controls/fields as intended. However, when I view the records the subform combobox is blank some of the time and yet the proper data is all there, as per the underlying table.
Apparently this is a known problem when 3 conditions exist, as per Microsoft.
1. The form is a continuous form, or it is open in Datasheet view so that you can view multiple records.
2. The combo box's RowSource property is set to a parameterized query to limit the number of rows in the combo box based on criteria in another field in the form.
3. The combo box criteria for the current record eliminate the rows that were selected in the other records.
Microsoft Access maintains only one query recordset for a combo box rather than one recordset for each combo box in each record.
When the criteria for the query that the combo box is based on change, rows that were selected in the other records may be eliminated from the recordset. As a result, the non-BoundColumn values are no longer available to be displayed.
RESOLUTION
Do not hide the BoundColumn field. If you want to see a different column, use the DLookup() function or the AutoLookup technique to display the information you want in another control on the form.
I am having trouble understanding this workaround, and was wondering if someone could please help me out. I did not provide any details and was hoping someone could explain the technique here.
One suggestion I read about said "You have to have the bound columns showing, you can't set the first column, assuming that's the bound to 0, you have to paste a label over it to try and hide it, then use another combo which takes the second column of the second combo as it's record source, it's fiddly and not perfect, but close"
I have a combobox in a continuous form view of a subform that is based on the results of a combobox in the main form.
Everything works fine input-wise! I am able to populate all the controls/fields as intended. However, when I view the records the subform combobox is blank some of the time and yet the proper data is all there, as per the underlying table.
Apparently this is a known problem when 3 conditions exist, as per Microsoft.
1. The form is a continuous form, or it is open in Datasheet view so that you can view multiple records.
2. The combo box's RowSource property is set to a parameterized query to limit the number of rows in the combo box based on criteria in another field in the form.
3. The combo box criteria for the current record eliminate the rows that were selected in the other records.
Microsoft Access maintains only one query recordset for a combo box rather than one recordset for each combo box in each record.
When the criteria for the query that the combo box is based on change, rows that were selected in the other records may be eliminated from the recordset. As a result, the non-BoundColumn values are no longer available to be displayed.
RESOLUTION
Do not hide the BoundColumn field. If you want to see a different column, use the DLookup() function or the AutoLookup technique to display the information you want in another control on the form.
I am having trouble understanding this workaround, and was wondering if someone could please help me out. I did not provide any details and was hoping someone could explain the technique here.
One suggestion I read about said "You have to have the bound columns showing, you can't set the first column, assuming that's the bound to 0, you have to paste a label over it to try and hide it, then use another combo which takes the second column of the second combo as it's record source, it's fiddly and not perfect, but close"