Connecting Tech Pros Worldwide Help | Site Map

Can I get the highlighted row from a dropdown?

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 13th, 2005, 02:57 PM
Bob Quintal
Guest
 
Posts: n/a
Default Can I get the highlighted row from a dropdown?

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.

  #2  
Old November 13th, 2005, 02:57 PM
Salad
Guest
 
Posts: n/a
Default Re: Can I get the highlighted row from a dropdown?

Bob Quintal wrote:
[color=blue]
> 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?
>[/color]
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
  #3  
Old November 13th, 2005, 02:57 PM
Bob Quintal
Guest
 
Posts: n/a
Default Re: Can I get the highlighted row from a dropdown?

Salad <oil@vinegar.com> wrote in
news:XUz7f.1782$yX2.720@newsread2.news.pas.earthli nk.net:
[color=blue]
> Bob Quintal wrote:
>[color=green]
>> 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?
>>[/color]
> 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[/color]

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.
  #4  
Old November 13th, 2005, 02:57 PM
Stephen Lebans
Guest
 
Posts: n/a
Default Re: Can I get the highlighted row from a dropdown?

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" <rquintal@sympatico.ca> wrote in message
news:Xns96FAE0C16EDA1BQuintal@207.35.177.135...[color=blue]
> Salad <oil@vinegar.com> wrote in
> news:XUz7f.1782$yX2.720@newsread2.news.pas.earthli nk.net:
>[color=green]
>> Bob Quintal wrote:
>>[color=darkred]
>>> 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?
>>>[/color]
>> 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[/color]
>
> 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.[/color]


  #5  
Old November 13th, 2005, 02:57 PM
Bob Quintal
Guest
 
Posts: n/a
Default Re: Can I get the highlighted row from a dropdown?

"Stephen Lebans"
<ForEmailGotoMy.WebSite.-WWWdotlebansdot...@linvalid.com> wrote
in news:cuC7f.114226$Ph4.3500866@ursa-nb00s0.nbnet.nb.ca:
[color=blue]
> 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.
>:-(
>[/color]
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.
  #6  
Old November 13th, 2005, 02:58 PM
Stephen Lebans
Guest
 
Posts: n/a
Default Re: Can I get the highlighted row from a dropdown?

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" <rquintal@sympatico.ca> wrote in message
news:Xns96FBB2909A08FBQuintal@207.35.177.135...[color=blue]
> "Stephen Lebans"
> <ForEmailGotoMy.WebSite.-WWWdotlebansdot...@linvalid.com> wrote
> in news:cuC7f.114226$Ph4.3500866@ursa-nb00s0.nbnet.nb.ca:
>[color=green]
>> 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.
>>:-(
>>[/color]
> 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.[/color]


  #7  
Old November 13th, 2005, 02:58 PM
Darryl Kerkeslager
Guest
 
Posts: n/a
Default Re: Can I get the highlighted row from a dropdown?

>>> I have a combobox on a form that contains titles of[color=blue][color=green][color=darkred]
>>> 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.[/color][/color][/color]


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

--
Darryl Kerkeslager



  #8  
Old November 13th, 2005, 02:58 PM
Bob Quintal
Guest
 
Posts: n/a
Default Re: Can I get the highlighted row from a dropdown?

"Stephen Lebans"
<ForEmailGotoMy.WebSite.-WWWdotlebansdot...@linvalid.com> wrote
in news:4VV7f.114686$Ph4.3514889@ursa-nb00s0.nbnet.nb.ca:
[color=blue]
> The solution on my site(back up now) adds the ability to work
> when the ScrollBar must be used.
>[/color]

Downloaded and will begin exploring. Thanks.

--
Bob Quintal

PA is y I've altered my email address.
  #9  
Old November 13th, 2005, 02:58 PM
Bob Quintal
Guest
 
Posts: n/a
Default Re: Can I get the highlighted row from a dropdown?

"Darryl Kerkeslager" <kerkeslager@comcast.net> wrote in
news:cImdnUnUNYogsv3eRVn-gw@comcast.com:
[color=blue][color=green][color=darkred]
>>>> 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.[/color][/color]
>
>
> Um, why not just use a second "notes" column?
>[/color]
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.
  #10  
Old November 13th, 2005, 02:58 PM
Darryl Kerkeslager
Guest
 
Posts: n/a
Default Re: Can I get the highlighted row from a dropdown?

>>>>> I have a combobox on a form that contains titles of[color=blue][color=green][color=darkred]
>>>>> 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.[/color]
>>
>>
>> Um, why not just use a second "notes" column?
>>[/color]
> sometimes, the notes run to 2kB of text, in 20 lines. That is not
> practical in a combobox.[/color]


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


  #11  
Old November 13th, 2005, 02:58 PM
Bob Quintal
Guest
 
Posts: n/a
Default Re: Can I get the highlighted row from a dropdown?

"Darryl Kerkeslager" <kerkeslager@comcast.net> wrote in
news:NrKdnaRPTKRd9PzeRVn-ig@comcast.com:
[color=blue][color=green][color=darkred]
>>>>>> 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?
>>>[/color]
>> sometimes, the notes run to 2kB of text, in 20 lines. That is
>> not practical in a combobox.[/color]
>
>
> 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.
>[/color]
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.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.