In my MS Access project I need to set selected index of a combobox using VBA. I used the syntax below to select the first item.
Application.CommandBars("MainMenu").Controls("Country").SelectedValue = "US"
After use the above syntax I get the error ”Object does not support this property or method”

I need help to setting the combo box selected item
Me.fromDate = Me.fromDate.ItemData(0) 'Get first item and set that to the selected value
Me.toDate = Me.toDate.ItemData(Me.toDate.ListCount - 1) 'Get last item and set that to the selected value
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With