Solved

Set Focus to a sub form on mouseover

Posted on 2004-08-11
5
504 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
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…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

910 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now