[AccessD] Report Navigation on Custom Toolbar

Rocky Smolin - Beach Access Software bchacc at san.rr.com
Sat Oct 1 16:28:05 CDT 2005


A.D.:

What happens if I use the pop-up form approach and the user changes the 
report sizing so that it no longer is in "FitToWindow" mode?

I'd like to put the navigation in the custom report toolbar I made but if 
SndKeys won't work then that's a no go.  How do you make a custom button for 
a toolbar anyway?


Thanks and regards,

Rocky

----- Original Message ----- 
From: "A.D.Tejpal" <adtp at touchtelindia.net>
To: "Access Developers discussion and problem solving" 
<accessd at databaseadvisors.com>
Sent: Friday, September 30, 2005 5:44 AM
Subject: Re: [AccessD] Report Navigation on Custom Toolbar


> Rocky,
>
>    It is a tiny pop-up form (similar to a tool bar) that sits in a corner 
> of the screen. It gets opened via report's open event and closed via 
> report's close event.
>
>    You might like to adapt the commands suitably to appropriate buttons on 
> your tool bar. In that case, the commands specific to the form (i.e. 
> hiding / un-hiding etc) can be ignored.
>
>    After ensuring that report window is the active one and the report is 
> in FitToWindow mode, SendKeys arguments as summarized below, would do the 
> needful.
>    (a) Go to Next Page  -   "{DOWN}"
>    (b) Go to Prev Page  -   "{UP}"
>    (c) Go to Last Page   -   "^{DOWN}"
>    (d) Go to First Page  -    "^{UP}"
>
>    It is observed that SendKeys commands do not get ported smoothly to 
> tool bar functions. If you find yourself stuck on this account, and wish 
> to avoid form based solution, you could consider experimenting with 
> fTurnPage feature available at Leban's site. For this, you would have to 
> download the file named ControlReports.zip.
>
>    Sample named ReportPreviewing.zip (by Heenan) at Roger's site, as 
> mentioned by Ervin, represents the pop-up form approach.
>
>    If at any stage, you happen to need a simplified sample based upon the 
> code sent by me earlier, I can try to put it together.
>
> Best wishes,
> A.D.Tejpal
> --------------
>
>  ----- Original Message ----- 
>  From: Rocky Smolin - Beach Access Software
>  To: Access Developers discussion and problem solving
>  Sent: Thursday, September 29, 2005 20:05
>  Subject: Re: [AccessD] Report Navigation on Custom Toolbar
>
>
>  A.D.:
>
>  Thanks for the idea.  Does this mean that the report preview appears in a 
> pop-up or that there's a pop-up form with the navigation buttons?
>
>  I already have a custom toolbar with a minimum of controls on it - print, 
> close, & fit.  I see that you can add controls for record navigation. 
> They look like the icons I want but of course they don't turn the pages of 
> a report.  I'd like to put the page navigation in the toolbar.
>  Is there a way to change the action of those icons you can put on a 
> custom toolbar?  Or is there a way to create a custom button for a toolbar 
> that would turn the pages of a report?
>
>  Thanks and regards,
>
>  Rocky Smolin
>  Beach Access Software
>  http://www.e-z-mrp.com
>  858-259-4334
>
>  ----- Original Message ----- 
>  From: "A.D.Tejpal" <adtp at touchtelindia.net>
>  To: "Access Developers discussion and problem solving"
>  <accessd at databaseadvisors.com>
>  Sent: Tuesday, September 27, 2005 11:00 AM
>  Subject: Re: [AccessD] Report Navigation on Custom Toolbar
>
>
>  > Rocky,
>  >
>  >    Sample code in the module of a pop-up form, as given below, enables
>  > page navigation of report named R_Test. Command button named CmdNext 
> steps
>  > forward through the pages while that named CmdPrev does the reverse.
>  >
>  >    You might like to adapt it suitably for your specific situation.
>  >
>  >    Note - For the SendKeys command (Up or Dn arrow) to be effective, it 
> is
>  > necessary that report is in FitToWindow mode and report's window is the
>  > active one.
>  >
>  > Best wishes,
>  > A.D.Tejpal
>  > --------------
>  >
>  > Code module for Pop Up Form
>  > ================================
>  > ' Declarations Section
>  > Private RepHdw As Long, FrmHdw As Long
>  >
>  > Private Declare Function BringWindowToTop Lib "user32" _
>  >                                    (ByVal hwnd As Long) As Long
>  > --------------------------------------------------------
>  > Private Sub CmdNext_Click()
>  >    DoCmd.Echo False
>  >    Me.Visible = False
>  >    BringWindowToTop RepHdw
>  >    DoCmd.RunCommand acCmdFitToWindow
>  >    SendKeys "{DOWN}", True
>  >    DoCmd.RunCommand acCmdZoom100
>  >    Me.Visible = True
>  >    BringWindowToTop FrmHdw
>  >    DoCmd.Echo True
>  > End Sub
>  >
>  > Private Sub CmdPrev_Click()
>  >    DoCmd.Echo False
>  >    Me.Visible = False
>  >    BringWindowToTop RepHdw
>  >    DoCmd.RunCommand acCmdFitToWindow
>  >    SendKeys "{UP}", True
>  >    DoCmd.RunCommand acCmdZoom100
>  >    Me.Visible = True
>  >    BringWindowToTop FrmHdw
>  >    DoCmd.Echo True
>  > End Sub
>  >
>  > Private Sub Form_Activate()
>  >    DoCmd.Restore
>  > End Sub
>  >
>  > Private Sub Form_Load()
>  >    RepHdw = Reports("R_Test").hwnd
>  >    FrmHdw = Me.hwnd
>  > End Sub
>  > ================================
>  >
>  >  ----- Original Message ----- 
>  >  From: Rocky Smolin - Beach Access Software
>  >  To: AccessD at databaseadvisors.com
>  >  Sent: Monday, September 26, 2005 23:41
>  >  Subject: [AccessD] Report Navigation on Custom Toolbar
>  >
>  >
>  >  Dear List:
>  >
>  >  I have a custom toolbar for reports that get displayed in report 
> preview
>  > if the db is an mde.  It has only printer icon, close button, and zoom
>  > control.  The paging navigation is of course, at the lower left of the
>  > screen in preview mode, but I'm wondering if these nav buttons can be
>  > added to the custom toolbar where an inexperienced user might be more
>  > likely to see them.
>  >
>  >  MTIA,
>  >
>  >  Rocky Smolin
>  >  Beach Access Software
>  >  http://www.e-z-mrp.com
>  >  858-259-4334
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com 




More information about the AccessD mailing list