Avatar of HomerTNachoCheese
HomerTNachoCheese
 asked on

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

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.
Microsoft Access

Avatar of undefined
Last Comment
HomerTNachoCheese

8/22/2022 - Mon
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)

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
Dale Fye

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.
HomerTNachoCheese

ASKER
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.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)

I see ...
HomerTNachoCheese

ASKER
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.
Dale Fye

so, what you want to do is scroll the records in the continuous form, but not change the selected record?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
HomerTNachoCheese

ASKER
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.
HomerTNachoCheese

ASKER
fyed - yes.  This is the current behavior, but only one record at a time.
Dale Fye

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.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
HomerTNachoCheese

ASKER
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.
SOLUTION
Dale Fye

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
HomerTNachoCheese

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
HomerTNachoCheese

ASKER
I am having to abort this idea, however your responses were helpful.  Thanks.