query for labels

ClaraBarton

Registered User.
Local time
Today, 14:40
Joined
Oct 14, 2019
Messages
716
is there a way to insert blank rows into a query that printing labels can start in any label?
I presently insert into a table and then insert blank rows but this seems like I may be missing an easier way.
 
Use a union query

Assuming your query is called myquery and you want 5 blanks

Select fld1,fld2, fld3 from myquery
Union all select top 5 null, null, null from myquery
 
OH! YES! Thank you.
 
No problem- although I was asked to do this for a client over 20 years ago to save paper labels (something like 32 labels per sheet) they stopped using it due to the time it took to count the number of labels used and to put the sheet back in the tray (the right way round!) v the cost of the sheet
 
is there a way to insert blank rows into a query that printing labels can start in any label?
I presently insert into a table and then insert blank rows but this seems like I may be missing an easier way.

The attached demo file illustrates how to print a variable number of labels starting at a selected position on the sheet. The report's query is:

SQL:
PARAMETERS
    Forms!frmlabelsDlg!optStartAt SHORT,
    Forms!frmlabelsDlg!txtNumberToprint SHORT;
SELECT
    IIF(Counter>=Forms!frmlabelsDlg!optStartAt,
    (Forms!frmlabelsDlg!txtLine1 & Chr(13) & Chr(10))
    & (Forms!frmlabelsDlg!txtLine2 & Chr(13) & Chr(10))
    & (Forms!frmlabelsDlg!txtLine3 & Chr(13) & Chr(10))
    & (Forms!frmlabelsDlg!txtLine4 & Chr(13) & Chr(10))
    & (Forms!frmlabelsDlg!txtLine5 & Chr(13) & Chr(10))
    & (Forms!frmlabelsDlg!txtLine6 & Chr(13) & Chr(10))
    & (Forms!frmlabelsDlg!txtLine7 & Chr(13) & Chr(10))
    & (Forms!frmlabelsDlg!txtLine8 & Chr(13) & Chr(10)),NULL) AS LabelText
FROM
    Counters
WHERE
    Counters.[Counter] < [Forms]![frmlabelsDlg]![txtNumberToprint] + [Forms]![frmlabelsDlg]![optStartAt];

The text entered in the controls in the dialogue form is assigned to a single text box control of fixed height in the report. The query will return NULL rows prior to the completed labels on the basis of the starting position selected in the dialogue form.
 

Attachments

Users who are viewing this thread

Back
Top Bottom