VB Code

E

Emma

Can someone tell me how to get the code for functions like forward and
backwards through forms? I know MS Access has built in functions how can I
use these for my own buttons? And I think it would make my life easier to be
able to see the original code. I'm a VB novice so any advice would be great,
thanks.
 
C

Clifford Bass

Hi Emma,

You want to use something like:

DoCmd.RunCommand acCmdRecordsGoToFirst

If you type in the code from DoCmd up through acCmdRecords you will see
the other options such as going to the next record or a new record.

You can get Access to generate the code for you for a button by using
the "Use Control Wizards" option. You can turn it on by clicking on the icon
with a wand, leaning to the left, with stars coming from the top, then
clicking on the button icon. You can then choose any of the record
navigation options. Note that in Access 2007, with an Access 2007 database,
it will create embedded macros instead of VBA code.

Clifford Bass
 

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