Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Skip entire label when field is blank

Status
Not open for further replies.

weigoldk

MIS
Jan 12, 2001
249
US
I have a database

Record1
Column A CaseNumber = 123
Column B CaseOutcome =blank

Record2
Column A CaseNumber =456
Column B CaseOutcome =RESOLVED

Record3
Colulmn A CaseNumber =398
Column B CaseOutcome = blank

I want to make labels (mailing labels). I want CaseNumer to print on the first label, I want CaseOutcome to print on the second label UNLESS CaseOutcome is blank. When CaseOutcome for the current record is blank, I want it to print the NEXT CaseNumber and so on. In other words I want to move to the next record when the field in column b is blank.

With my sample above, the labels would print

123 456 RESOLVED 398
 
Thanks Duane,
I can't picture a union query right now, but when I get a chance, I'll dig in and see if I can get a better grasp of your idea.

If I am following you right, I'll end up (following my sample data above) with one column:

123
456
RESOLVED
398

 
Your query might look like:
Code:
SELECT [Column A] As Col
FROM tblNoName
WHERE [Column A] is not Null
UNION ALL
SELECT [Column B]
FROM tblNoName
WHERE [Column B] is not Null;
I expect you might want to add another column to get a value for sorting the results.

Duane
Hook'D on Access
MS Access MVP
 
Duane, it worked perfectly for me. Thank you for your help. I have over 100K labels to print before the end of the year and now it will be a piece of cake.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top