• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 584
  • Last Modified:

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?

Thanks,
John
0
leachj
Asked:
leachj
1 Solution
 
Rey Obrero (Capricorn1)Commented:
try

me.section(0).setfocus
0
 
fhlio_adminCommented:
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()
    cmdBLANK.SetFocus
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.
0
 
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.

Thanks,
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now