Printing labels

Michael audax at wideband.net.au
Wed Mar 12 15:53:49 PDT 2008


As requested, here is the code for a subroutine which skips a number  
of (previously printed and used) rows on a labels sheet and commences  
printing at the first available row.  Sorry for the delay - I sent it  
a few days ago but to the wrong address.

I have completely re-written my original code (it now takes less than  
20% of its original space) as a generic subroutine.

The call command is in the form:

Call SkipLabelRows Labels form name, No of rows to skip, No of labels  
per row

The subroutine is:

	Local FormName, SkipRows, RowLabels, Blanks

	FormName = Parameter(1)
	SkipRows = val(Parameter(2))
	RowLabels = val(Parameter(3))

	Blanks = SkipRows*RowLabels
	Save

	Loop
    		InsertRecord
	Until Blanks

	Message "Place the requisite number of sheets of labels in the  
printer and click OK."

	OpenForm FormName
	Print ""
	CloseWindow

	Revert
	Rtn

The subroutine saves the database, opens the labels form, prints the  
selected data, closes the form and reverts the database to its initial  
status.  It is a very simple procedure which the user can easily  
modify - for instance, you might want to remove the Save and Revert  
commands to the calling procedure.

Please holler if any aspect of it is unclear.

michael


On 10/03/2008, at 11:52 PM, William Conable wrote:

> So we don't have to reinvent the wheel, could you append the  
> procedure?
>
> Thanks
> Bill Conable



More information about the Qna mailing list