Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Set Focus to a sub form on mouseover

Posted on 2004-08-11
5
548 Views
Last Modified: 2008-03-10
I am working on a form that has several subforms.  The user selects items from the subforms to help build a query.  Is there a way to change the focus to a subform simply by moving the mouse over it? Thus allowing the scroll wheel to scroll through the list of selections?  As the mouse moves to a different subform, the scroll wheel would then scroll through the selections on that subform.
0
Comment
Question by:CWHines81
  • 2
5 Comments
 
LVL 27

Accepted Solution

by:
jjafferr earned 250 total points
ID: 11778203
Try using the On Mouse,
Then specify the .left and .top of each subform,
then use the select case OR if statement to set focus on the first field in the subform, like this

if xxx.left= n1 and yyy.top=n2 then
 Forms![MainFormName]![SubformName].Form![FieldNameInSubform].setfocus
elseif xxx.left= nn1 and yyy.top=nn2 then
....
endif

jaffer
0
 

Author Comment

by:CWHines81
ID: 11782587
Couple of questions, I have never worked with plotting mouse positions before.
I assume the n1 n2   and nn1  nn2  are the tops and lefts of my subforms.  dint I also have to use the heights and widths?
also how do I determine my mouse position?  is that the xxx.left and yyy.top?  how do I declare these variables?
I also don't see the "on mouse" option, do I use "on mouse move"?
0
 
LVL 27

Expert Comment

by:jjafferr
ID: 12036913
CWHines81

I just came accross this which might help you
http://www.experts-exchange.com/Databases/MS_Access/Q_20335899.html


jaffer
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question