scroll a form using VBA

DNewman

Registered User.
Local time
Today, 10:58
Joined
Oct 12, 2012
Messages
60
Hi,
I use Access 2010 in Windows 7.

Is it possible to use VBA code to move the scrollbar 'box' on a form?
eg. scroll to the top of the form or scroll to the bottom.:confused:
 
Are we talking about a continuous form with multiple records? Or a single form that is too big for the form window?
 
If it's a continuous form, you can use;
Code:
DoCmd.GotoRecord , , acLast
to go to the last record or;
Code:
DoCmd.GotoRecord , , acFirst
to go to the first record.

The following will do similar and would produce a more scrolling like result;
Code:
Set rstSubForm = Forms!YourFormName.Form.Recordset

Do While Not rstSubForm.EOF

   rstSubForm.MoveNext   [COLOR="DarkGreen"]'rstSubForm.MovePrevious[/COLOR]

Loop
 

Users who are viewing this thread

Back
Top Bottom