Solved

Set Focus to a sub form on mouseover

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
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…

708 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

16 Experts available now in Live!

Get 1:1 Help Now