Catch NavigationButton Event

W

Warren

I have the Navigation Buttons enabled on a form.
The Record Source for this form is a query.

I would like to catch the event that occurs when the user
clicks on the Navigation buttons at the bottom of the form.
These navigation buttons do not appear in the Design mode
of the form, and I've tried many of the Events for the
Form (On ..., Before...) to catch it.

Please let me know if you have any ideas.

thanks
Warren
 
R

Rick Brandt

Warren said:
I have the Navigation Buttons enabled on a form.
The Record Source for this form is a query.

I would like to catch the event that occurs when the user
clicks on the Navigation buttons at the bottom of the form.
These navigation buttons do not appear in the Design mode
of the form, and I've tried many of the Events for the
Form (On ..., Before...) to catch it.

If the event "just after they navigate" is sufficient you can use the
current event. If you want "just before they navigate" you will have to
remove the built-in buttons and implement your own. The caveat there is
that there are a myriad of ways that the user can navigate and you'll need
to catch (or block) them all.

PageUp, PageDown, Apply a filter, Remove a filter, Edit Go To on the menu
bar, etc..
 
S

Sandra Daigle

Hi Warren,

Your question is getting answers in both this newsgroup and in
microsoft.public.access.formscoding. Please do not multipost - If you feel
you need to post to more than one group please cross-post (send the one
message to all groups at once), rather than multi-post (send individual
messages to each group). In this way, all responses to your post will be
available together, regardless of what group the responder was in, and the
rest of us won't have to read your post multiple times.

See http://www.mvps.org/access/netiquette.htm for more information.
 
S

Sandra Daigle

Hi Warren,

[reposting - the original is somewhere floating around msnews.com]

There is no single event for these - most can be intercepted by using the
Current event since it fires anytime the form goes to a new/different record
but this doesn't tell you which navigation button was clicked. Depending on
your needs, you may be better off creating your own navigation buttons.
Stephen Lebans has a nice sample database that includes the code for custom
navigation buttons.

http://www.lebans.com/recnavbuttons.htm
 

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