Combo / OGrid / SendMessage woes

  • Thread starter Thread starter TC
  • Start date Start date
T

TC

Hi folks

Access uses the OGrid class for the dropped-down list of a combo box. Say
the user moves the mouse to an entry in the dropped-down list, then clicks
it to select that entry. The combo box's MouseDown event occurs.

I need to determine which entry the user clicked from that list - then
CANCEL the click, because the combo's controlsource (not rowsource) is
actually bound to a function. I can easily cancel the click -
docmd.cancelevent works fine - but I can not figure how to get the selected
entry using APIs.

I know that Access combo boxes are heavily subclassed, & do not necessarily
respond to many (most? all?) of the normal SendMessage calls.

So, my question, to anyone who understands what I am talking about, is this:
"Is it possible? If so, how?" !

TIA,
TC
 
It seems strange the hoops you are jumping through but I'm sure you must
have your reasons. Also you would have to include logic to handle when
the Keyboard is use to navigate/select a row in the control.

I'll leave the column calculations to you but here is a solution to
determine the current highlighted row of a ComboBox control.
http://www.lebans.com/combocurrentrow.htm

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Stephen, thank you very much for your reply. I had actually drafted an email
to you, to see if you would quote on writing the code in question. But I
thought that I would give the newsgroups one try, first.

=== YEA FOR NEWSGROUPS! ===

Let me know (now or in future) if there is anything that I can do for you in
return. Probably that would NOT include, writing screen management API code
!!

Thanks again,
TC
 
Thanks TC. I wrote it because of all of the good work you do in the
NG's!
:-)
--

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