gazsharpe101
Registered User.
- Local time
- Today, 02:02
- Joined
- Oct 23, 2007
- Messages
- 47
Hi everyone,
I have a problem which I assume will have an annoyingly simple solution.
I have a combo box that is populated by an SQL statement, which works ok. What I want to happen is when I open the form that the combo box is on, I would like it to autoselect the first item in the combo box rather than having to click on the arrow and select it.
I have looked around many websites but to no avail. I have tried:
Me.cboName.Value=Me.cboName.Itemdata(0)
and I have also tried setting the list index.
I have been advised that there is a selectedindex property but I can't find it in VBA to use this.
Any help is much appreciated.
Thanks.
Gareth.
I have a problem which I assume will have an annoyingly simple solution.
I have a combo box that is populated by an SQL statement, which works ok. What I want to happen is when I open the form that the combo box is on, I would like it to autoselect the first item in the combo box rather than having to click on the arrow and select it.
I have looked around many websites but to no avail. I have tried:
Me.cboName.Value=Me.cboName.Itemdata(0)
and I have also tried setting the list index.
I have been advised that there is a selectedindex property but I can't find it in VBA to use this.
Any help is much appreciated.
Thanks.
Gareth.