PC Review Forums Newsgroups Microsoft Access Microsoft Access VBA Modules Combo / OGrid / SendMessage woes

Reply

Combo / OGrid / SendMessage woes

 
Thread Tools Rate Thread
Old 02-02-2004, 05:06 AM   #1
TC
Guest
 
Posts: n/a
Default Combo / OGrid / SendMessage woes


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
Old 02-02-2004, 11:30 PM   #2
Stephen Lebans
Guest
 
Posts: n/a
Default Re: Combo / OGrid / SendMessage woes

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" <a@b.c.d> 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
Old 03-02-2004, 04:17 AM   #3
TC
Guest
 
Posts: n/a
Default Re: Combo / OGrid / SendMessage woes

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.-WWWdotlebansdotcom@linvalid.com>
wrote in message news:OzHusud6DHA.2416@TK2MSFTNGP10.phx.gbl...
> 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" <a@b.c.d> 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
Old 03-02-2004, 05:59 AM   #4
Stephen Lebans
Guest
 
Posts: n/a
Default Re: Combo / OGrid / SendMessage woes

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" <a@b.c.d> 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.-WWWdotlebansdotcom@linvalid.com>
> wrote in message news:OzHusud6DHA.2416@TK2MSFTNGP10.phx.gbl...
> > 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" <a@b.c.d> 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
Old 03-02-2004, 06:50 AM   #5
TC
Guest
 
Posts: n/a
Default Re: Combo / OGrid / SendMessage woes

Thanks for the compliment!

Your code works fine for my purpose.

TC


"Stephen Lebans" <ForEmailGotoMy.WebSite.-WWWdotlebansdotcom@linvalid.com>
wrote in message news:OOVi1Hh6DHA.2044@TK2MSFTNGP10.phx.gbl...
> 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" <a@b.c.d> 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.-WWWdotlebansdotcom@linvalid.com>
> > wrote in message news:OzHusud6DHA.2416@TK2MSFTNGP10.phx.gbl...
> > > 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" <a@b.c.d> 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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off