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

Can I get the highlighted row from a dropdown?

P: n/a
I have a combobox on a form that contains titles of categories, one
of which is to be assigned to a record.

I'd like to show users some notes on each category to aid in the
selection decision, but I can't find a way to determine which row
is highlighted.

I tried using the mouseover event to return the .listindex value
and update the notes textbox, but that returns null unless the row
is selected by clicking or typing in the start of the value.

..Seltop appears not supported in the combobox, because I tried
using that and Access complained.

Google turns up nothing on the web, or from the newsgroups.

Does anybody have any suggestions?

--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
Bob Quintal wrote:
I have a combobox on a form that contains titles of categories, one
of which is to be assigned to a record.

I'd like to show users some notes on each category to aid in the
selection decision, but I can't find a way to determine which row
is highlighted.

I tried using the mouseover event to return the .listindex value
and update the notes textbox, but that returns null unless the row
is selected by clicking or typing in the start of the value.

.Seltop appears not supported in the combobox, because I tried
using that and Access complained.

Google turns up nothing on the web, or from the newsgroups.

Does anybody have any suggestions?

I think a listbox would be better to present a list like that to the
users...but...both work pretty much the same. I would create a textbox
to hold the comments/notes. In the OnClick event write something that
finds the notes...something similar to
Sub Combo_OnClick
Dim rst As Recordset
set rst = Currentdb.Openrecordset("TableWithNotes",dbopensna pshot)
rst.findfirst "TableID = " & Me.Combo
Me.Text0 = rst!NotesField
rst.close
set rst = Nothing
End Sub
Nov 13 '05 #2

P: n/a
Salad <oi*@vinegar.com> wrote in
news:XU****************@newsread2.news.pas.earthli nk.net:
Bob Quintal wrote:
I have a combobox on a form that contains titles of
categories, one of which is to be assigned to a record.

I'd like to show users some notes on each category to aid in
the selection decision, but I can't find a way to determine
which row is highlighted.

I tried using the mouseover event to return the .listindex
value and update the notes textbox, but that returns null
unless the row is selected by clicking or typing in the start
of the value.

.Seltop appears not supported in the combobox, because I
tried using that and Access complained.

Google turns up nothing on the web, or from the newsgroups.

Does anybody have any suggestions?

I think a listbox would be better to present a list like that
to the users...but...both work pretty much the same. I would
create a textbox to hold the comments/notes. In the OnClick
event write something that finds the notes...something similar


Cannot use a listbox, for several reasons. Even there,
the on click event doesn't work for what I need to do.
And I do have a textbox for the notes, and that part works
perfectly from the comboboxes After Update events.
I actually put the notes in a hidden column of the combobox.

It's just that I want the user to see the notes before making a
selection, to prompt him/her to make the right selection.
In order to do that, I need to determine which row of the
combobox dropdown is highlighted (reverse video).

--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #3

P: n/a
Look at how I did in the Tooltips class on my site. Unfortunately my ISP is
in Florida and my site is down for now.
:-(
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Bob Quintal" <rq******@sympatico.ca> wrote in message
news:Xn**********************@207.35.177.135...
Salad <oi*@vinegar.com> wrote in
news:XU****************@newsread2.news.pas.earthli nk.net:
Bob Quintal wrote:
I have a combobox on a form that contains titles of
categories, one of which is to be assigned to a record.

I'd like to show users some notes on each category to aid in
the selection decision, but I can't find a way to determine
which row is highlighted.

I tried using the mouseover event to return the .listindex
value and update the notes textbox, but that returns null
unless the row is selected by clicking or typing in the start
of the value.

.Seltop appears not supported in the combobox, because I
tried using that and Access complained.

Google turns up nothing on the web, or from the newsgroups.

Does anybody have any suggestions?

I think a listbox would be better to present a list like that
to the users...but...both work pretty much the same. I would
create a textbox to hold the comments/notes. In the OnClick
event write something that finds the notes...something similar


Cannot use a listbox, for several reasons. Even there,
the on click event doesn't work for what I need to do.
And I do have a textbox for the notes, and that part works
perfectly from the comboboxes After Update events.
I actually put the notes in a hidden column of the combobox.

It's just that I want the user to see the notes before making a
selection, to prompt him/her to make the right selection.
In order to do that, I need to determine which row of the
combobox dropdown is highlighted (reverse video).

--
Bob Quintal

PA is y I've altered my email address.

Nov 13 '05 #4

P: n/a
"Stephen Lebans"
<ForEmailGotoMy.WebSite.-WWWdotlebansdot...@linvalid.com> wrote
in news:cu**********************@ursa-nb00s0.nbnet.nb.ca:
Look at how I did in the Tooltips class on my site.
Unfortunately my ISP is in Florida and my site is down for
now.
:-(

Thanks, Stephen, I'll check it out when I get a chance.

I actually developed a solution, in reading the Y coordinate that's
passed to the mouseover event, and scaling that to get a row number
and showing the help data in the textbox. Good way to kill a lunch
hour.

The Access documentation on the event is sorely lacking.

--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #5

P: n/a
The solution on my site(back up now) adds the ability to work when the
ScrollBar must be used.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

"Bob Quintal" <rq******@sympatico.ca> wrote in message
news:Xn**********************@207.35.177.135...
"Stephen Lebans"
<ForEmailGotoMy.WebSite.-WWWdotlebansdot...@linvalid.com> wrote
in news:cu**********************@ursa-nb00s0.nbnet.nb.ca:
Look at how I did in the Tooltips class on my site.
Unfortunately my ISP is in Florida and my site is down for
now.
:-(

Thanks, Stephen, I'll check it out when I get a chance.

I actually developed a solution, in reading the Y coordinate that's
passed to the mouseover event, and scaling that to get a row number
and showing the help data in the textbox. Good way to kill a lunch
hour.

The Access documentation on the event is sorely lacking.

--
Bob Quintal

PA is y I've altered my email address.

Nov 13 '05 #6

P: n/a
>>> I have a combobox on a form that contains titles of
categories, one of which is to be assigned to a record.

I'd like to show users some notes on each category to aid in
the selection decision, but I can't find a way to determine
which row is highlighted.

Um, why not just use a second "notes" column?

--
Darryl Kerkeslager

Nov 13 '05 #7

P: n/a
"Stephen Lebans"
<ForEmailGotoMy.WebSite.-WWWdotlebansdot...@linvalid.com> wrote
in news:4V**********************@ursa-nb00s0.nbnet.nb.ca:
The solution on my site(back up now) adds the ability to work
when the ScrollBar must be used.


Downloaded and will begin exploring. Thanks.

--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #8

P: n/a
"Darryl Kerkeslager" <ke*********@comcast.net> wrote in
news:cI********************@comcast.com:
I have a combobox on a form that contains titles of
categories, one of which is to be assigned to a record.

I'd like to show users some notes on each category to aid in
the selection decision, but I can't find a way to determine
which row is highlighted.

Um, why not just use a second "notes" column?

sometimes, the notes run to 2kB of text, in 20 lines. That is not
practical in a combobox.

--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #9

P: n/a
>>>>> I have a combobox on a form that contains titles of
> categories, one of which is to be assigned to a record.
>
> I'd like to show users some notes on each category to aid in
> the selection decision, but I can't find a way to determine
> which row is highlighted.

Um, why not just use a second "notes" column?

sometimes, the notes run to 2kB of text, in 20 lines. That is not
practical in a combobox.

Well, maybe it's just me, but I can't picture scrolling down a dropdwon
list, and reading up to 20 lines of text to make a decision on which choice
to make. It just doesn't sound like a user-friendly way to make a
selection, and it is not one I've seen before, even if you do find a
technical way to accomplish it.

--
Darryl Kerkeslager
Nov 13 '05 #10

P: n/a
"Darryl Kerkeslager" <ke*********@comcast.net> wrote in
news:Nr********************@comcast.com:
>> I have a combobox on a form that contains titles of
>> categories, one of which is to be assigned to a record.
>>
>> I'd like to show users some notes on each category to aid
>> in the selection decision, but I can't find a way to
>> determine which row is highlighted.
Um, why not just use a second "notes" column?

sometimes, the notes run to 2kB of text, in 20 lines. That is
not practical in a combobox.

Well, maybe it's just me, but I can't picture scrolling down a
dropdwon list, and reading up to 20 lines of text to make a
decision on which choice to make. It just doesn't sound like
a user-friendly way to make a selection, and it is not one
I've seen before, even if you do find a technical way to
accomplish it.

Stephen Lebans' tooltips database example uses a very similar
concept on a listbox. Very elegant.

I did get it working well the way I designed it, however, and
used a method similar to Stephen's way of getting the row from a
listbox, I'm trying to adapt his code to work on the combobox,
because his tooltips look a lot nicer, and waste much less real
estate.

Essentially I have a set of cascading comboboxes, a sort of
treeview, to set item classifications in an ERP system. The top
level contains 7 categories. Each of those six have from 3 to 8
subcategories, and some of those have a third level.

The notes are to offer suggestions about what goes where, in
cases of ambiguity. Right now I have the 3 combos set up, and
the notes column is set to 0 width. There is a big textbox above
and thanks to mr Lebans' code, I was able to figure out how to
use the mousemove coordinates to determine which row is
highlighted, and make the corresponding notes appear in the
textbox as the mouse hovers over the dropdown. His tooltips idea
is similar, in that you can put a lot more text into his
tooltips than in the control's controltip property 255 character
limit.
--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.