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

how to make the top row of combo box = 1st entry

P: n/a
After I update a combo box, you have to click on the arrow to actually see
whats in the list.
Is there a way to have the first entry or first row be equal to the first
entry in the list?

Thanks in advance
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Danny" <da********@hotmail.com> wrote in
news:Dv*******************@news4.srv.hcvlny.cv.net :
After I update a combo box, you have to click on the arrow to
actually see whats in the list.
Is there a way to have the first entry or first row be equal
to the first entry in the list?

Thanks in advance

const x = 1 'set to bound column of listbox,
const y = 0 'desired row, one less than its actual position
Me.combo0.value = me.combo0.column(x,y)

and to preset it to the last row,

Me.Combo0.value = me.combo0.column(1,me.combo0.listcount -1)

Bob Quintal
Nov 13 '05 #2

P: n/a
On Sun, 30 May 2004 12:55:32 GMT, Bob Quintal <bq******@generation.net> wrote:
"Danny" <da********@hotmail.com> wrote in
news:Dv*******************@news4.srv.hcvlny.cv.ne t:
After I update a combo box, you have to click on the arrow to
actually see whats in the list.
Is there a way to have the first entry or first row be equal
to the first entry in the list?

Thanks in advance

const x = 1 'set to bound column of listbox,
const y = 0 'desired row, one less than its actual position
Me.combo0.value = me.combo0.column(x,y)

and to preset it to the last row,

Me.Combo0.value = me.combo0.column(1,me.combo0.listcount -1)


That's correct if the combo box has no column headers. If it does have column
headers, the column headers are row zero, and the first data row is row 1.
Personally, I like to make a generic function for this job that checks whether
the combo box has headers or not, and does the right thing.
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.