Solved

Set Focus to a sub form on mouseover

Posted on 2004-08-11
5
572 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
[X]
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
  • 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

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Familiarize people with the process of utilizing SQL Server views 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 Access…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

740 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