Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / January 2006

Tip: Looking for answers? Try searching our database.

How do I remove the focus from ddlist after making selection?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ethan - 22 Dec 2005 17:16 GMT
Making a selection in a drop-down list runs a db query. My users are making
their selection, getting the query results then try to scroll with the wheel
which opens the ddlist again.

How do I remove the focus from the ddlist control after the query is run?

On behalf of my users and I, thank you in advance.
S.Y.M. Wong-A-Ton - 22 Dec 2005 18:40 GMT
Hi Ethan,

Have you already tried setting the focus on another field using SelectText
or SelectNodes?

http://blogs.msdn.com/infopath/archive/2004/04/07/109189.aspx

Regards,
S.Y.M. Wong-A-Ton

> Making a selection in a drop-down list runs a db query. My users are making
> their selection, getting the query results then try to scroll with the wheel
[quoted text clipped - 3 lines]
>
> On behalf of my users and I, thank you in advance.
Ethan - 22 Dec 2005 19:30 GMT
SelectNodes works. The problem is I need to select the node as soon as the
query results are returned without any user action and if I combine Query()
with SelectNodes I get a run-time error saying that the SelectNodes call is
an invalid selection.

How do I get SelectNodes to run after the query results are returned using
the same trigger event such as OnAfterChange?

Thanks for the quick response.
Ethan

> Hi Ethan,
>
[quoted text clipped - 13 lines]
> >
> > On behalf of my users and I, thank you in advance.
bratt - 23 Dec 2005 15:32 GMT
I had a similar error showing when I hid a dropdown based on what the
user selected and showed a text box in same location (similar to the
"Type text..." combo box in the InfoPath Conditional Format Dialog). I
had solved my SelectText problem by setting a flag and selecting a
third Node (not a drop down node) and for the OnContextChange method I
checked for the flag and redirected back to the desired node via
SelectText.
(This problem only seemed to occur with my code when in a repeated
section).
Ethan - 27 Dec 2005 14:29 GMT
Setting the Tab index of the ddlist control to -1 did the job.
Thanks to Ashish for this simple solution. See his post "Subject: RE:
Changing the focus on the view"

> I had a similar error showing when I hid a dropdown based on what the
> user selected and showed a text box in same location (similar to the
[quoted text clipped - 5 lines]
> (This problem only seemed to occur with my code when in a repeated
> section).
Greg Collins [InfoPath MVP] - 18 Jan 2006 01:00 GMT
The problem is because your drop-down list is the first selectable control in the view. If you had something else selectable before that (like a text box or check box or anything else) then you could use the wheel without any problem.

Signature

Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com

Making a selection in a drop-down list runs a db query. My users are making
their selection, getting the query results then try to scroll with the wheel
which opens the ddlist again.

How do I remove the focus from the ddlist control after the query is run?

On behalf of my users and I, thank you in advance.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.