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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to "Page Down" in VBA code? 1

Status
Not open for further replies.

dannydanny

IS-IT--Management
Oct 9, 2002
109
DK
Hi,

I have a continous form with many records. I can create a macro to page down whenever a button is clicked, but I would like to write the VBA code equivalent of the Page Down macro. Could anyone please give me some tips?

After I created the Macro, I tried: DoCmd.RunMacro (PageDown), where PageDown was the name of my macro, but the compiler didn`t recognise that PageDown was the name of a macro......("err: var. is undefined")

Any help much appreciated,
Danny.
 
Try to avoid using Access Macros as much as possible. Among other deficiencies they can't use ADO or DAO recordsets or even use a forms recordset.

Try the GotoPage method of the Form Object to Page Down and Up. Alternatively, you can use the GotoPage Method of the DoCmd Object.

You'll need to add page breaks in your form I think.
 
Oh, and by the way, your DoCmd.RunMacro (PageDown) code needs to include quotes around the name of the macro.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top