'Do Access recordset fields() need initializing?
I use the onClick event to get values from a combo box. As here: Me.ComboSelProject.Recordset.Fields(0).Value On the first onClick event, no matter what row has been selected, the value is from the first row of the recordset. On subsequent onClick events the value is for the selected row. The value shown in the face of the combobox is always the correct selected value. IOW comboSelProject.text is always correct. I've tried to initialize the combobox in the Form_load() procedure using: Me.ComboSelClient.Value = Me.ComboSelClient.ItemData(0) but this has not helped. Thanks for any help ...
Solution 1:[1]
The click event happens before the change event. If you want to use the new value, use the Change event.
And you should probably try to initialize the .text of the combo box rather than the .value
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | david |
