D
Dave
1. I have a combo box on a subform that is displayed in contiuous form mode
(i.e., more than one record is displayed).
When I set a value in the parent form, I need to check all of the records on
the subform and if the value in the combobox is NULL, I need to change it to
the value set on the parent.
I can reference the combo box of the first record on the subform as:
If IsNull(Me.f_check_SUB.Form![cboInvestment].Value) Then
do something...
But how can I check each record in the subform and take the necessary
action?
I think I need to loop through all of the records, checking each combobox as
I go. But I cannot find an syntax example of how to reference individual
records. Does anyone have some sample code of how to do this?
2. When I reference a combo box as "![cboInvestment].Value" I get the value
of the ID in the bound column by default.
But what if I have 3 values associated with the combobox: the hidden ID, the
displayed value, and another hidden value.
How can I reference the other 2 values (the displayed value and the second
hidden value)?
For example, if the combobox is populated with a value list as
"1;California;West" how do I write code to return the values of "California"
and "West?"
(i.e., more than one record is displayed).
When I set a value in the parent form, I need to check all of the records on
the subform and if the value in the combobox is NULL, I need to change it to
the value set on the parent.
I can reference the combo box of the first record on the subform as:
If IsNull(Me.f_check_SUB.Form![cboInvestment].Value) Then
do something...
But how can I check each record in the subform and take the necessary
action?
I think I need to loop through all of the records, checking each combobox as
I go. But I cannot find an syntax example of how to reference individual
records. Does anyone have some sample code of how to do this?
2. When I reference a combo box as "![cboInvestment].Value" I get the value
of the ID in the bound column by default.
But what if I have 3 values associated with the combobox: the hidden ID, the
displayed value, and another hidden value.
How can I reference the other 2 values (the displayed value and the second
hidden value)?
For example, if the combobox is populated with a value list as
"1;California;West" how do I write code to return the values of "California"
and "West?"