A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

"Auto Repeat" feature on command buttons



 
 
Thread Tools Display Modes
  #1  
Old January 15th, 2005, 07:10 AM
John S. Ford, MD
external usenet poster
 
Posts: n/a
Default "Auto Repeat" feature on command buttons

I'm coding in Access 97. Because I needed to customize the way a particular
form navigates through records, I created and coded my own record navigation
buttons. This works fine except for one thing. I'd like them to behave the
same way the "real" navigation buttons work when the user keeps one of them
down: automatically repeating.

In the Acc97 help files, the Auto Repeat property of a command button is
described. It is specifically stated that despite setting it to "Yes", if
the event handler changes the current record, the Auto Repeat property has
no effect. Well, they weren't lying!

Is there any way to get around this?

John


Ads
  #2  
Old January 15th, 2005, 07:17 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default

AutoRepeat does work, but as you found it does not work for a change of
record.

One workaround is to place the nav buttons in an unbound subform. Naturally
the code has to be changed so that it changes record in the main form, but
IIRC that allows the AutoRepeat to do its thing.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"John S. Ford, MD" wrote in message
...
I'm coding in Access 97. Because I needed to customize the way a
particular
form navigates through records, I created and coded my own record
navigation
buttons. This works fine except for one thing. I'd like them to behave
the
same way the "real" navigation buttons work when the user keeps one of
them
down: automatically repeating.

In the Acc97 help files, the Auto Repeat property of a command button is
described. It is specifically stated that despite setting it to "Yes", if
the event handler changes the current record, the Auto Repeat property has
no effect. Well, they weren't lying!

Is there any way to get around this?

John



  #3  
Old January 15th, 2005, 07:49 AM
John S. Ford, MD
external usenet poster
 
Posts: n/a
Default

Allen,

Thanks for the idea. One question. I'm writing the code for the navigation
button sitting on my new subform. How do I make the DoCmd object operate on
the main form as in:

DoCmd.GoToRecord , , acNext

where I'm refering to the parent form that the subform is sitting on?

John


  #4  
Old January 15th, 2005, 11:53 AM
Rob Oldfield
external usenet poster
 
Posts: n/a
Default

You just need to specify the name of the form to use....in your case:

DoCmd.GoToRecord acDataForm, Parent.Name, acNext



"John S. Ford, MD" wrote in message
...
Allen,

Thanks for the idea. One question. I'm writing the code for the

navigation
button sitting on my new subform. How do I make the DoCmd object operate

on
the main form as in:

DoCmd.GoToRecord , , acNext

where I'm refering to the parent form that the subform is sitting on?

John




  #5  
Old January 15th, 2005, 04:18 PM
Stephen Lebans
external usenet poster
 
Posts: n/a
Default

As Allen said, stick your CommandButtons on a SubForm. Sample code is
he
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.


"John S. Ford, MD" wrote in message
...
I'm coding in Access 97. Because I needed to customize the way a

particular
form navigates through records, I created and coded my own record

navigation
buttons. This works fine except for one thing. I'd like them to

behave the
same way the "real" navigation buttons work when the user keeps one of

them
down: automatically repeating.

In the Acc97 help files, the Auto Repeat property of a command button

is
described. It is specifically stated that despite setting it to

"Yes", if
the event handler changes the current record, the Auto Repeat property

has
no effect. Well, they weren't lying!

Is there any way to get around this?

John



  #6  
Old January 15th, 2005, 11:12 PM
John S. Ford, MD
external usenet poster
 
Posts: n/a
Default

Thanks Rob. That was easy enough!

John

You just need to specify the name of the form to use....in your case:

DoCmd.GoToRecord acDataForm, Parent.Name, acNext

DoCmd.GoToRecord , , acNext


where I'm refering to the parent form that the subform is sitting on?

John






  #7  
Old January 15th, 2005, 11:15 PM
John S. Ford, MD
external usenet poster
 
Posts: n/a
Default

Stephen, I sure wish I'd been aware of your pre-coded record navigation
buttons before I started coding them myself! Yours look exactly like what
I'm looking for. Thanks,

John

"Stephen Lebans"
wrote in message ...
As Allen said, stick your CommandButtons on a SubForm. Sample code is
he
http://www.lebans.com/recnavbuttons.htm HTH


Stephen Lebans



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"Auto Repeat" feature on command buttons John S. Ford, MD General Discussion 6 January 15th, 2005 11:15 PM
I want to know how to turn off the auto capitalization feature! Carolina Co. General Discussion 1 December 18th, 2004 06:39 PM
auto date complete feature doesn't work indycar02 General Discussion 2 October 19th, 2004 12:05 AM
How to turn off the Auto Preview Feature in Outlook XP Manfred Lenke General Discussion 2 September 13th, 2004 04:27 AM
Auto Install of "new feature"? Dale-very-upset Powerpoint 1 September 1st, 2004 02:33 PM


All times are GMT +1. The time now is 09:59 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 OfficeFrustration.
The comments are property of their posters.