Easiest way to do this is set the value in the form's Load event; you can
use this line of code:
Me.ComboBoxName.Value = Me.ComboBoxName.ItemData(1)

Signature
Ken Snell
<MS ACCESS MVP>
>I see a lot of posts here about combo boxes, but have not quite found my
> problem yet... I swear I have seen this before, and I may even have used
[quoted text clipped - 12 lines]
>
> What code do I use?
Hi, Bill.
In the form's OnCurrent( ) event, try:
Me!cboNames = Me!cboNames.Column(0, 1)
. . . where cboNames is the name of the combo box, 0 is the combo box's
bound column (numbering starts at zero), and 1 is the second row (numbering
starts at zero).
HTH.
Gunny
See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.
(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.
> I see a lot of posts here about combo boxes, but have not quite found my
> problem yet... I swear I have seen this before, and I may even have used
[quoted text clipped - 11 lines]
>
> What code do I use?
'69 Camaro - 27 Oct 2005 03:53 GMT
Doh! That's probably not the event you want that code in. Please disregard
my suggestion of the OnCurrent( ) event and use the form's OnLoad( ) event.
HTH.
Gunny
See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.
(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.
> Hi, Bill.
>
[quoted text clipped - 37 lines]
> >
> > What code do I use?