How do I set the focus to detail section of contiuous form?

I have a listbox in the detail section of a continuous form.  I click in the listbox and scroll with mousewheel through the list.  When I click out of the listbox and on to the detail section, The mousewheel continues to scroll the listbox.  I want it to scroll the form.  In order to do this, I have to click into another control (not another listbox), on the detail section.  I have tried using the detail section onclick event and the forms onclick event to no avail.    Any suggestions?

Who is Participating?
fhlio_adminConnect With a Mentor Commented:
The SetFocus method is not available on a section of the form.  If it is utilized on the Form itself, it uses the current default control on the form.

The best suggestion that I can give is that you create a button (my example is named "cmdBLANK") that has a width and height of 0.  Then on your detail section use the OnClick event and set the focus to the command button:

Private Sub Detail_Click()
End Sub

Open in new window

The fact that you have set the command button to do nothing allows for nothing to happen that will effect your application.
Rey Obrero (Capricorn1)Commented:

leachjAuthor Commented:
True, there is no setfocus for the sections.  I've tried to setfocus on controls in the detail section using its onclick event to no avail.  However in going back, and trying again it seems to work.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.