[AccessD] Report Navigation on Custom Toolbar

A.D.Tejpal adtp at touchtelindia.net
Wed Oct 12 13:03:36 CDT 2005


Rocky,

    SendKeys is not considered the preferred option, for reasons explained by Lambert. Although access 2K onwards appear to stand extended calls to SendKeys fairly well, it would still be desirable as a further safeguard, to adopt the wrapper function devised by him.

    The other alternative would lie in suitable modification / adaptation of function fTurnPage(), available at Stephan Leban's web site. It makes extensive use of API calls, avoiding direct  SendKeys commands.

    My sample db named ReportTurnPages might be of interest to you. It is available at Rogers Access Library (other developers library). Link - http://www.rogersaccesslibrary.com 

    The sample db demonstrates navigation through pages of access reports in following alternative styles (all equally effective). 
        (a) Custom tool bar - simple code, based upon SendKeys.
        (b) Pop-up form - simple code, based upon SendKeys.
        (c) Custom tool bar - elaborate code with extensive use of API calls - This option is based upon function fTurnPage() at Stephan Leban's web site (contained in file ControlReports.zip).

Best wishes,
A.D.Tejpal
--------------
  ----- Original Message ----- 
  From: Rocky Smolin - Beach Access Software 
  To: Access Developers discussion and problem solving 
  Sent: Wednesday, October 05, 2005 21:42
  Subject: Re: [AccessD] Report Navigation on Custom Toolbar


  A.D.:

  Thanks for pointing me in the right direction.  I got the four buttons up there now, even edited their appearance to more mimic the standard navigation buttons and I point them to one of the four public functions:

  Option Compare Database
  Option Explicit

  Public Function FirstPage()
      SendKeys "^{UP}"
  End Function

  Public Function PreviousPage()
      SendKeys "{UP}"
  End Function

  Public Function NextPage()
      SendKeys "{DOWN}"
  End Function

  Public Function LastPage()
      SendKeys "^{DOWN}"
  End Function

  Somewhere I read, however, that SendKeys is not good form, there's some problem with them, but I can't remember what.  You think we're safe using SendKeys in this limited way?  Is there an alternative?

  Thanks and regards,

  Rocky Smolin
  Beach Access Software
  http://www.e-z-mrp.com
  858-259-4334



More information about the AccessD mailing list