Navigation Button Events

  • Thread starter Thread starter ABW
  • Start date Start date
A

ABW

Greetings all:

I am having a problem populating certain controls with the values that I
need when using the default Record Navigation Buttons. I think it is
because I don't know the events that fire nor do I know the sequence of
those events. Further, I'd really like to design my own navigation buttons,
because the population that I am desinging the application for will probably
not know how to use the default buttons.

Does anyone have any snippits of code or links to resources that would shead
some light on the subject?

Thanks in advance.



I am working on an application where I think I need to design my own
navigation buttons.
 
If you use the control toolbox and draw a button on your
form you can use the command button wizard to specify what
the button is to do: Goto First Record, Goto Previous
Record, Goto Next Record, and Goto Last Record will mimic
the operation of the navigation buttons. Finsh using the
wizard to set up your buttons and then you can simply edit
the _Click events of those buttons to perform whatever
operations you want (e.g. populate your controls) as the
user navigates.

For what you are trying to do, it is also good to use the
Form Properties to set the Navigation Buttons to "No" so
the "real" nav buttons don't show and can't be used.

For the larger question, refer to the Access Help
topic "When Events Occur" to see the order of events when
certain actions are taken on forms, etc.
 
For the sequence of events, search the help file for 'order of events' - In
Access 2003, I had to perform this search from the main Access window, no
results were returned when I tried it from the VBA window.

For custom navigation buttons, there's a command button wizard that will get
you started. While the control wizards don't produce the most elegant code,
this one is not too bad to begin with. Just make sure that the control
wizards button (looks like a magician's wand with stars, usually the second
icon in the toolbox) is pushed in and place a command button on the form -
record navigation is the default category.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
Back
Top