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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
"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 |
#2
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 10:15 PM |
I want to know how to turn off the auto capitalization feature! | Carolina Co. | General Discussion | 1 | December 18th, 2004 05: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 |