test for continuous mousedown event?

C

Craig Buchanan

I have a button that moves a record one position when it is clicked. i
would like to continue to advance records when the button is held down.
what would be the best way to do this?

thanks,

craig buchanan
 
L

Leif

I don't know of a standard Access event that will handle that. You will
probably need to research a windows call, and associate that with a timer.

Another option is to look into a mouse with a wheel. That may be used to
skip through records quickly.
 
J

Jesper F

I have a button that moves a record one position when it is clicked. i
As it's said there's probably nothing standard.

Maybe you could do something like


Button is pressed -> move one record -> set the form timer to 200.
OnTimer-event should also move to next record (it'll then move after every
200 milliseconds).
OnMouseUp should set timer to 0.

This isn't tested, but maybe it'll give you an idea.


Jesper, Denmark
 
S

Stephen Lebans

If you create your own custom Nav Buttons and place them on a SubForm
then you can get the autorepeating functionality of the native Access
Nav buttons.
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.
 
C

Craig Buchanan

thanks for the responses. turns out there is an Auto Repeat property for
the button. once enabled, the button acted as expected.
 
C

Craig Buchanan

Stephen-

Thanks for the response. I built something what you've done, but not linked
to a recordset. let me know and i'll send you the code.

Craig
 
S

Stephen Lebans

The Autorepeat property has never worked for a CommandButton control
when emulating a MoveNext nav button. You have to place the Nav
CommandButton controls on a Subform to allow the Autorepeat prop to
work.

--

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

Craig Buchanan

Yep, that is what I did. I wanted to build a navigation control that I
could use across multiple forms, so I build my "control" as a form. I then
add add it to each form I want to control.

Incidentally, I have noticed a weird behavior--if you set focus to a
command button that has the AutoRepeat property set to true, then the button
appears to be recessed. Have you seen this?

Craig
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top