Solved

Set Focus to a sub form on mouseover

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…

821 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