Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom navigation buttons

Status
Not open for further replies.

georgp

Technical User
Mar 28, 2002
96
US
Hi,

in order to browse through the data in my form, I have included my own navigation buttons (command buttons: first, last, next, previous) working on VBA code.
The problem I have is that upon activation of the command button only the next or previous record will appear and I have to click again to move to the subsequent dataset.
This is a major speed problem when navigating through large databases.
Is it possible to make the command button repeat the previous/next command as long as it pressed (as possible with the access navigation buttons)?

Thanks for any help, georgp
 
geogrp:

I don't know of any way to get the click event to repeat as you want.

It would not be elegant, but you could add another button or buttons to jump a specific number of records. Use a for next loop in the On Click event to move whatever number of records would be appropriate.

What I do is use a combo box as a look up along with the navigation buttons. With autoexpand on, Access will 'find' the first available record based on the user entry. This allows the user to jump to the specific record rather than using the navigation buttons.

HTH

Larry De Laruelle
ldelaruelle@familychildrenscenter.org

 
Thanks, Larry.

I will consider your suggestions. I just thought access VBA should offer such a possibility, as the standard navigation buttons allow to 'browse'.

If somebody else knows how to do the trick, I still would be interested.

Thanks again, georgp
 
Here is just a suggestion. I don't really have time to investigate this too much, but it is sort of interesting.
How about setting a flag on mouse down, setiing a timer
and moving the record, checking the flag. Then turn the flag off with mouseup or mouse move. That might work.
If it does, let me know, I might use it.

-Chris
 
Access has this type of thing built in, its call AutoRepeat. The only things is that it doesn't work. It's one of the bugs in Access. Maybe you can find a way of coding around the bug. But as far as using things built into Access, there is not much that can help you on this one.
 
I've never tried it myself but even if it worked as advertised, it would not work in this instance. From Access Help:

"If the code attached to the command button causes the current record to change, the AutoRepeat property has no effect."

Another MS idea relegated to the trash heap of good intentions but bad execution.


Larry De Laruelle
ldelaruelle@familychildrenscenter.org

 
Thanks guys for your time,

looks like something to investigate when in the bath tub.
Chris, I will look into your suggestion. Although I understand your point, I am not sure, if I really can manage that.
But still I am wondering, how other people handle this..
Do most people use the standard navigation buttons? I felt there might be some data entry issues difficult to trap (I do e.g. a full verification incl. elimination of trash letters in text fields, and a plausibility check for numbers, etc.), but I am not so firm about what ACCESS offers.

Anyway, if there is something to add, I apprecdiate your comments.
Thanks a lot, georgp
 
Hi georgp,

Just for your info, Tek-Tips has a VERY GOOD Search facility.

For the last month or so I have had an example of Custom buttons posted at
The file to look at is Buttons.zip, should give you some ideas.

Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top