Automatically scroll through records

  • Thread starter Thread starter bobdydd
  • Start date Start date
B

bobdydd

Hi Everybody

Access 2000 Windows xp

On a form with a single command button connected to a database of 1
thousand records.

I would like to be able to press the command button and automatically
scroll through the records as quickly as possible. annd then stop at
the end of the recordset.

Something like this below but continuous.

Private Sub CmdScroll_Click()
DoCmd.GoToRecord , , acNext
End Sub

Thanks
 
Hi Everybody

Oops! Should have read:

Access 2000 on Windows xp


On a form connected to a database of 1 thousand records.....there is
command button CmdScroll


I would like to be able to press the command button and automatically
scroll through the records as quickly as possible. and then stop at
the end of the recordset.


Something like this below but continuous.


Private Sub CmdScroll_Click()
DoCmd.GoToRecord , , acNext
End Sub


Thanks
 
Hi TC
Thanks for the swift reply.........I am probably not explaining myself
correctly.

What I am trying to do is to go from record to record by clicking on
the CmdScroll.
Like the normal go to next record......but........go to next record
........go to next record .......go to next record .......until it
reaches the eof.

I suppose the navigation buttons at the bottom of an Access WIndows
form is the effect I'm trying to achieve.
 
If you're trying to achieve the same effect as the navigation buttons
at the bottom of a form - why don't you just use those buttons? Why do
you want to write code for something that Access already provides for
you?

TC (MVP Access)
http://tc2.atspace.com
 
Try setting the "Auto Repeat" Property (in the "Other tab of the Properties
window) to Yes (True).
 
I never used this property so I just tried.
==> don't think this works for record-navigation.

Anyone uses this property? For what purpose ?

Arno R
 
It works for rec nav if you place the control on a form used as a Subform.
http://www.lebans.com/recnavbuttons.htm
RecordNavigationButtons is an MDB containing code to replace the standard
Navigation Buttons. The custom buttons exactly emulate the standard
navigation bar including the autorepeat property.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


I never used this property so I just tried.
==> don't think this works for record-navigation.

Anyone uses this property? For what purpose ?

Arno R
 
does


DoCmd.GoToRecord , , acLast

not do what you want to do for you

or


DoCmd.GoToRecord , , acLast

DoCmd.GoToRecord , , acPrevious a few times to have some of
them show
 
Arno

I referred to the CommandButton as stated by the O.P., not the Navigation
Bar at the bottom of the Datasheet / Form.

--
HTH
Van T. Dinh
MVP (Access)



I never used this property so I just tried.
==> don't think this works for record-navigation.

Anyone uses this property? For what purpose ?

Arno R
 
I placed a commandbutton in the header of a continuous form.
I coded the button to go to the next record on_Click
I did set the Autorepeat-property to 'yes'
But: it did not work when I clicked with the mouse ... focus only moved one record.

Arno R
 
It is possible that one of the Form Events in changing the current record
stops the AutoRepeat action (because the CommandButton will lose the focus
briefly???)

It sounds like Stephen Lebans' method (Subform) is the way to go.

--
HTH
Van T. Dinh
MVP (Access)




I placed a commandbutton in the header of a continuous form.
I coded the button to go to the next record on_Click
I did set the Autorepeat-property to 'yes'
But: it did not work when I clicked with the mouse ... focus only moved one
record.

Arno R
 
Back
Top