By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,456 Members | 1,472 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,456 IT Pros & Developers. It's quick & easy.

Set Access ComboBox Default Value to First in List

P: n/a
I have a combo box in a subform that will have different options
depending on values in the main form.

I would like the combo box to default to the first value in the list.

Any help would be much appreciated, thanks.

Aug 24 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
an*******@gmail.com wrote in
news:11**********************@m73g2000cwd.googlegr oups.com:
I have a combo box in a subform that will have different
options depending on values in the main form.

I would like the combo box to default to the first value in
the list.

Any help would be much appreciated, thanks.

Easy enough to do in code of the OnCurrent Event of the subform

if me.newrecord then
me.combobox.value = me.combobox.column(index,row)
end if

Index Required Long. A long integer that can range from 0 to
the setting of the ColumnCount property minus one.

Row Optional Variant. An integer that can range from 0 to the
setting of the ListCount property minus 1.

the value for index should correspond to the bound column of the
combobox. if you have only one column and want the first row,
it's column(0,0)
--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Aug 25 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.