Re: combo box - select 1st item
- From: Marshall Barton <marshbarton@xxxxxxxxxx>
- Date: Sat, 16 Apr 2005 11:02:45 -0500
Way to go Dave, fighting your way through documentation
omissions to discover that trick is a significant
achievement.
Here's another way to do what you want without the need to
change the focus:
Me.Combo = Me.Combo.ItemData(0)
--
Marsh
MVP [MS Access]
dave h wrote:
>The VBA documentation for the combo box ListIndex property says that this is
>a "read only" property - this is not true as it can be used to select a row
>in the combo box. My mistake was not setting focus on the combo box first.
>
>"dave h" wrote
>> After setting the rowsource in VBA for a combo box, I need to select the
>1st
>> item for display in the text box part of the combo box.
>> Neither "Selected(0)" or "listindex = 0" work for this purpose. Must be a
>> simple answer, but I can't find a similar question on this board.
.
- Follow-Ups:
- Re: combo box - select 1st item
- From: dave h
- Re: combo box - select 1st item
- References:
- combo box - select 1st item
- From: dave h
- Re: combo box - select 1st item
- From: dave h
- combo box - select 1st item
- Prev by Date: Re: DMax/DLookup help
- Next by Date: Re: How to print an external file?
- Previous by thread: Re: combo box - select 1st item
- Next by thread: Re: combo box - select 1st item
- Index(es):
Relevant Pages
|