Microsoft Most Valued Professional MVP - Access Expert

mvp.png

  Boyd Trimmell, aka HiTech Coach
  Microsoft MVP - Access Expert


What is a Microsoft  Most Valuable Professional (MVP)?
Microsoft  awards the Most Valuable Professional (MVP) in recognition of significant contributions made to technical communities by sharing high quality, real world expertise. Microsoft Most Valuable Professionals (MVPs) are a worldwide network of exceptional technical community leaders.

"If technology doesn't work for people, then it doesn't work."
- Kim Vicente

Preview a Report and move to last page

The only way I have been able to figure out how to preview a report and have it automatically go to the last page is to use Sendkeys.

Here is example code that works in the On Click event of a Command Button used to open the report:

{codecitation class="engine parameters" width="" }

'* open a report in preview mode

     DoCmd.OpenReport "Your Report Namne Here", acViewPreview


'* used the keyboard shortcut to move to the last page.

     SendKeys "{End}", True

'
      DoEvents

{/codecitation}

Note: The Sendkeys will not work if placed in an event on the report.