Datasheet

Designing Applications
37
7.
Draw the button a suitable size on the footer:
8. Now go to the property sheet and change the Name property of the button (found
under the Other tab) to cmdNext and its Caption property (found under the Format
tab) to Next.
Note that when you name controls on a form it is a good idea to use a prefix that matches
their type (like cmd for a command button). This makes the type obvious when you come
to use the control in your VBA code, which makes your programs more readable and can
help to reduce errors. Unfortunately there is no common standard for prefixes. Every
company I've ever seen seems to use different ones (for example tb, txb, txtbx,
textbox, for text boxes) and Microsoft have never published consistent guidelines. The
best advice I can give is to find out what standards your company uses or, if none, use
your own (sensible) prefixes and then be ready to change them at a later date!
9. Now we must instruct the button to display the next record whenever it is clicked. To
do this, you right-click on the button and select Build Event... from the pop-up menu
which appears: