Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MS Access Continuous Forms - Mouse Wheel 7 records at a time

Posted on 2012-12-28
14
Medium Priority
?
968 Views
Last Modified: 2013-01-12
I have a payroll form that is set as continous forms in MS Access 2007.

When using the mouse wheel, the screen scrolls 1 record at a time (the current record still stays the same).

I would like to somehow program this form that when scrolling with the mouse wheel, the form scrolls 7 records at a time, as each employee has 7 records - one for each day of the week.  

The current record should still not change.  I do not want to move 7 records at a time, just scroll 7 records at a time.
0
Comment
Question by:HomerTNachoCheese
[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
  • 7
  • 4
  • 3
14 Comments
 
LVL 75
ID: 38727966
Wouldn't that be a function of your mouse applet?  How many lines to scroll when you use the roller wheel?

Not aware of any way in VBA to control this.

mx
0
 
LVL 48

Expert Comment

by:Dale Fye
ID: 38727986
What version of Access are you using?

In 2007, there is a Form_MouseWheel event in which you can add code.  There is also a Count argument available in the event to tell you how many records have already been scolled.

You could then use a recordset and the movePrevious, MoveNext methods to move to the appropriate record.
0
 
LVL 6

Author Comment

by:HomerTNachoCheese
ID: 38728027
MX - I could possibly alter the mouse applet to get it to scroll 7 records, but then I would also be locking all payroll users into a setting that they may not want.
Fyed - I need the current record to not change.  MS Access 2007.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 75
ID: 38728034
I see ...
0
 
LVL 6

Author Comment

by:HomerTNachoCheese
ID: 38728045
I don't think MS Access really cares what my mouse settings are with respect to wheel scrolling in the applet.  MS Access takes each scroll action as a single record move when in single form, and a single record scroll in continuous forms.
0
 
LVL 48

Expert Comment

by:Dale Fye
ID: 38728048
so, what you want to do is scroll the records in the continuous form, but not change the selected record?
0
 
LVL 6

Author Comment

by:HomerTNachoCheese
ID: 38728049
It seems that each time MS Access detects one unit of wheel movement, it scrolls one record.  So, where to change the rule from 1=1 to 1=7.
0
 
LVL 6

Author Comment

by:HomerTNachoCheese
ID: 38728051
fyed - yes.  This is the current behavior, but only one record at a time.
0
 
LVL 48

Expert Comment

by:Dale Fye
ID: 38728061
What do you want to do if scrolling the records up by 7 would hide the currently selected record?

Is this continuous form a subform or the main form?  I'm going to have to play with it a bit to see if I can get this to work.
0
 
LVL 6

Author Comment

by:HomerTNachoCheese
ID: 38728092
The idea was to not fire off code for "OnCurrent" by changing records during the scroll.

However, I may have to rethink this as I am still having no luck with the Google searching.

Let me take a step back to explain why I want to do what I am doing, and perhaps moving records can be made to work and visually work out for the end user.

The payroll data entry screen has 100 or so employees, each with 7 records - Sunday through Saturday.  When scrolling around, I want the topmost record on the screen to be the complete 7 records for an employee and scroll 7 records at a time so that this is always the case.  

By using commands to move forward or backwards with movenext or moveprevious, the screen does not necessarily scroll until the offset number of records is actually off-screen.  So, the user could be scrolling and the screen does not move.

This may be a "no-solution" question.

Perhaps if I could figure out how to determine the number of records visible on the screen and determine where on the screen the selected record is at, I could calculate a set of moves to give the effect of moving one employee at a time.  I could end up making the database do odd things as a result depending on screen size, whether MS Access is maximized, etc.
0
 
LVL 48

Assisted Solution

by:Dale Fye
Dale Fye earned 1000 total points
ID: 38728121
One method would be to include a listbox (or subform) that displays each employee.  Then, beside it, display only the 7 records for the selected week for the employee selected in the listbox or subform.  This way, you are not looking at 700 records at a time and will not be confused about which employees record is being worked on (which could happen easily if you are on the first or last record for an employee).
0
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 1000 total points
ID: 38728133
0
 
LVL 6

Accepted Solution

by:
HomerTNachoCheese earned 0 total points
ID: 38728210
Still not what I am looking for, as the record changes.  

I may have to go that route, or just not program this at all.  

Will see what comes up after I get back Wednesday.  If nothing better, 250 points apiece.

Thanks for the help MX and Fyed!

If there is a SendKeys "{mouse x,y}" equivelant or some method to determine where the scroll bars are located, and simulate clicking them at those x,y coordinates, then that could be a viable alternate solution.  the x,y coordinates of the scroll up and scroll down buttons on the scroll bar are dynamic - they change from user to user based on the positioning of MS Access.  Unfortunately sending up and down arrow keystrokes, or page up/page down keystrokes still change the current record.  Tried even keyboard scroll locking with arrow keys.  Works in Excel, not Access.
0
 
LVL 6

Author Closing Comment

by:HomerTNachoCheese
ID: 38769724
I am having to abort this idea, however your responses were helpful.  Thanks.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

715 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