I have some code to get address for mailing list.
It all works and the address is pulled out in a field called Contact Address Block which i can drop onto my formatted report which has three columns set up for the labels. All is good and i have a full page of labels ready to print. However, Because some of the labels have 6 lines and others 7 lines the labels are offset and don't print out within the labels.
Can anyone give advice on padding out the 6 line label to 7. I've tried all sorts but keep getting errors and am getting very frustrated now.
This is the code which produces labels.....
select dbo.TblPupilManagementPupils.txtSchoolID, dbo.TblPupilManagementPupils.txtForename AS ForeName, dbo.TblPupilManagementPupils.txtSurname AS Surname,
dbo.TblPupilManagementPupils.txtFullName AS FullName, dbo.TblPupilManagementPupils.txtPreName AS PreferredName, dbo.TblPupilManagementPupils.txtForm AS Form,
dbo.TblPupilManagementPupils.intSystemStatus,
dbo.TblPupilManagementPupils.txtSiblingsFormList + char(13) + char(10)
+ dbo.TblPupilManagementAddresses.txtLabelSalutation + char(13) + char(10)
+ dbo.TblPupilManagementAddresses.txtAddress1 + CASE txtAddress2 WHEN '' THEN ' ' ELSE char(13) + char(10)
+ txtAddress2 END + CASE txtAddress3 WHEN '' THEN ' ' ELSE char(13) + char(10) + txtAddress3 END + CASE txtTown WHEN '' THEN ' ' ELSE char(13) + char(10)
+ txtTown END + CASE txtCounty WHEN '' THEN '' ELSE char(13) + char(10) + txtCounty END + CASE txtCountry WHEN '' THEN '' ELSE char(13) + char(10)
+ txtCountry END + CASE txtPostcode WHEN '' THEN '' ELSE char(13) + char(10)+ txtPostcode END AS ContactAddressBlock
FROM dbo.TblPupilManagementAddresses
It all works and the address is pulled out in a field called Contact Address Block which i can drop onto my formatted report which has three columns set up for the labels. All is good and i have a full page of labels ready to print. However, Because some of the labels have 6 lines and others 7 lines the labels are offset and don't print out within the labels.
Can anyone give advice on padding out the 6 line label to 7. I've tried all sorts but keep getting errors and am getting very frustrated now.
This is the code which produces labels.....
select dbo.TblPupilManagementPupils.txtSchoolID, dbo.TblPupilManagementPupils.txtForename AS ForeName, dbo.TblPupilManagementPupils.txtSurname AS Surname,
dbo.TblPupilManagementPupils.txtFullName AS FullName, dbo.TblPupilManagementPupils.txtPreName AS PreferredName, dbo.TblPupilManagementPupils.txtForm AS Form,
dbo.TblPupilManagementPupils.intSystemStatus,
dbo.TblPupilManagementPupils.txtSiblingsFormList + char(13) + char(10)
+ dbo.TblPupilManagementAddresses.txtLabelSalutation + char(13) + char(10)
+ dbo.TblPupilManagementAddresses.txtAddress1 + CASE txtAddress2 WHEN '' THEN ' ' ELSE char(13) + char(10)
+ txtAddress2 END + CASE txtAddress3 WHEN '' THEN ' ' ELSE char(13) + char(10) + txtAddress3 END + CASE txtTown WHEN '' THEN ' ' ELSE char(13) + char(10)
+ txtTown END + CASE txtCounty WHEN '' THEN '' ELSE char(13) + char(10) + txtCounty END + CASE txtCountry WHEN '' THEN '' ELSE char(13) + char(10)
+ txtCountry END + CASE txtPostcode WHEN '' THEN '' ELSE char(13) + char(10)+ txtPostcode END AS ContactAddressBlock
FROM dbo.TblPupilManagementAddresses