PC Review


Reply
Thread Tools Rate Thread

Combo / OGrid / SendMessage woes

 
 
TC
Guest
Posts: n/a
 
      2nd Feb 2004
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


 
Reply With Quote
 
 
 
 
Stephen Lebans
Guest
Posts: n/a
 
      2nd Feb 2004
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.


"TC" <(E-Mail Removed)> wrote in message news:1075694307.885118@teuthos...
> 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
>
>


 
Reply With Quote
 
TC
Guest
Posts: n/a
 
      3rd Feb 2004
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


"Stephen Lebans" <ForEmailGotoMy.WebSite.-(E-Mail Removed)>
wrote in message news:(E-Mail Removed)...
> 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.
>
>
> "TC" <(E-Mail Removed)> wrote in message news:1075694307.885118@teuthos...
> > 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
> >
> >

>



 
Reply With Quote
 
Stephen Lebans
Guest
Posts: n/a
 
      3rd Feb 2004
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.


"TC" <(E-Mail Removed)> wrote in message news:1075777908.899721@teuthos...
> 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
>
>
> "Stephen Lebans"

<ForEmailGotoMy.WebSite.-(E-Mail Removed)>
> wrote in message news:(E-Mail Removed)...
> > 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.
> >
> >
> > "TC" <(E-Mail Removed)> wrote in message news:1075694307.885118@teuthos...
> > > 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
> > >
> > >

> >

>
>


 
Reply With Quote
 
TC
Guest
Posts: n/a
 
      3rd Feb 2004
Thanks for the compliment!

Your code works fine for my purpose.

TC


"Stephen Lebans" <ForEmailGotoMy.WebSite.-(E-Mail Removed)>
wrote in message news:(E-Mail Removed)...
> 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.
>
>
> "TC" <(E-Mail Removed)> wrote in message news:1075777908.899721@teuthos...
> > 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
> >
> >
> > "Stephen Lebans"

> <ForEmailGotoMy.WebSite.-(E-Mail Removed)>
> > wrote in message news:(E-Mail Removed)...
> > > 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.
> > >
> > >
> > > "TC" <(E-Mail Removed)> wrote in message news:1075694307.885118@teuthos...
> > > > 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
> > > >
> > > >
> > >

> >
> >

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fry's Electronics Cheap Combo woes Don W. McCollough DIY PC 4 30th Jan 2007 03:54 PM
Combo box woes =?Utf-8?B?aGFtbWV5MjI=?= Microsoft Access Forms 19 28th Apr 2006 11:45 AM
How to get ListItemValue and ListItemText from a Combo using SendMessage ME Microsoft Dot NET Framework Forms 7 5th Apr 2006 06:45 PM
More combo box woes =?Utf-8?B?RWQgSA==?= Microsoft Access 2 22nd Mar 2006 04:17 AM
Combo Box Woes =?Utf-8?B?UEhpc2F3?= Microsoft Access Forms 6 8th Mar 2006 08:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:18 PM.