[AccessD] Skip labels in report

Stuart McLachlan stuart at lexacorp.com.pg
Tue Jan 17 21:14:56 CST 2012


One way to create the dummy records is to use a dimension table (a table just containing 
consecutive numbers) and use a UNION query as the record source for the report, passing 
the number to skip through a static function.


Static Function LabelsToSkip(Optional qty as long = -1) as long
  Local store as Long
  If qty > -1 then
     store = qty 
  End If
  LabelsToSkip = store
End Function


TblDimensionTable
==============
DimValue
1
2
3
4
....


Report Recordsource:
================
Select "","","","","","","" from tblDimensionTable where DimValue <= LabelsToSkip()
UNION
Select * from qryMyRealReportQuery.


To run the report:
=============
....
LabelsToSkip 12
Docmd.OpenReport "rptLabels" ...
...


-- 
Stuart

On 17 Jan 2012 at 18:40, Charlotte Foust wrote:

> Keep in mind that the report generator isn't intended for word processing
> and it prints in bands.  The only way I can think of to do what you want
> would be to set up report using columns and then create dummy records for
> the used column(s).  You might want to try doing a mail merge to Word if
> you need to control the order that way.  It's actually built to handle that.
> 
> Charlotte Foust
> 
> On Tue, Jan 17, 2012 at 6:01 PM, Carolyn Johnson <cjlabs at att.net> wrote:
> 
> > I have been using code to skip labels so that the new labels start
> > printing after the used ones.  This is the code that Microsoft has --
> > entering a number of labels to skip and using me.nextrecord and
> > me.printsection to move to the correct label.   The code works fine if I
> > have the labels set up to print across, then down.
> >
> > However, if I change the labels to print down, then across, I cannot skip
> > beyond the first column of labels.   For example, I want to print the next
> > label in row 3 column 2 of a 30 label sheet (3 columns of 10 labels).
> >  Printing down, then across means I am skipping 12 labels.  When I enter 12
> > however, it puts the next label in row 1 of column 2, not row 3.
> >
> > If the report is set up to print across, then down and I skip 7 labels, it
> > prints in the correct place.
> >
> > I can't find any information on why this is happening or how to fix it.
> > For my purposes, it is much easier to use the labels if they print down
> > first.
> >
> > Any help would be appreciated.
> >
> >
> >
> >
> > Thanks
> > Carolyn Johnson
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> >
> >
> > Website: http://www.databaseadvisors.com
> >
> >
> >
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 

--
Stuart McLachlan

Ph:    +675 340 4392 
Mob: +675 7100 2028
Web: http://www.lexacorp.com.pg



More information about the AccessD mailing list