D DNewman Registered User. Local time Today, 10:58 Joined Oct 12, 2012 Messages 60 Jan 19, 2013 #1 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.
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.
John Big Booty AWF VIP Local time Today, 21:58 Joined Aug 29, 2005 Messages 8,243 Jan 19, 2013 #2 Are we talking about a continuous form with multiple records? Or a single form that is too big for the form window?
Are we talking about a continuous form with multiple records? Or a single form that is too big for the form window?
John Big Booty AWF VIP Local time Today, 21:58 Joined Aug 29, 2005 Messages 8,243 Jan 19, 2013 #3 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
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