Can anyone help to add serial no on a label report (1 Viewer)

naobao

Registered User.
Local time
Today, 13:07
Joined
Feb 13, 2014
Messages
76
Hi,

I want to auto add a serial no on a label report,

but need to base on a "ID" column

if value is "0", don't show the serial no,

please see the attached file "sample 1" & "sample 2"


Thank you very much!
 

Attachments

  • sample.jpg
    sample.jpg
    183.7 KB · Views: 92

mike60smart

Registered User.
Local time
Today, 21:07
Joined
Aug 6, 2017
Messages
1,913
In the underlying query that the Report is based on set criteria for the ID field >0
 

naobao

Registered User.
Local time
Today, 13:07
Joined
Feb 13, 2014
Messages
76
Hi,

I want to auto add a serial no on a label report,

but need to base on a "ID" column

if value is "0", don't show the serial no,

please see the attached file "sample 1" & "sample 2"


Thank you very much!
If set criteria for the ID field >0 in query,

I can't show the all the label in report
 

June7

AWF VIP
Local time
Today, 12:07
Joined
Mar 9, 2014
Messages
5,488
You want to show the record but not assign a serial number if ID = 0?

Use report RunningSum property set to OverAll. Expression in ControlSource like: =IIf(ID > 0, 1, 0).

Then some code behind report that hides/unhides the Serial textbox.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.tbxSerial.Visible = Me.tbxID > 0
End Sub

Or instead of VBA, set the RunningSum textbox as not visible and tbxSerial with expression: =IIf([ID] > 0, [tbxRunning], Null)
 
Last edited:

naobao

Registered User.
Local time
Today, 13:07
Joined
Feb 13, 2014
Messages
76
You want to show the record but not assign a serial number if ID = 0?

Use report RunningSum property set to OverAll. Expression in ControlSource like: =IIf(ID > 0, 1, 0).

Then some code behind report that hides/unhides the Serial textbox.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.tbxSerial.Visible = Me.tbxID > 0
End Sub

Or instead of VBA, set the RunningSum textbox as not visible and tbxSerial with expression: =IIf([ID] > 0, [tbxRunning], Null)
Thanks!
I will try!
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:07
Joined
May 7, 2009
Messages
19,247
you can also try to use Conditional format when the Field = 0, make the Forecolor White.
 

naobao

Registered User.
Local time
Today, 13:07
Joined
Feb 13, 2014
Messages
76
you can also try to use Conditional format when the Field = 0, make the Forecolor White.
Is no use!!

I can't start the serial no "1" at the second or third label
 

Gasman

Enthusiastic Amateur
Local time
Today, 21:07
Joined
Sep 21, 2011
Messages
14,350
Is no use!!

I can't start the serial no "1" at the second or third label
You have to give people a little more than that to go on? :(
How do you decide on which label to start showing it on?

What is the field you are trying to use, or are you generating it on the fly?
Upload your db with enough data to show the problem and explicit instructions on how to recreate the issue.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 16:07
Joined
Feb 19, 2002
Messages
43,352
The requirement and the example seem really strange. What is the purpose of the labels? Why do you not want to number some of the cartons? I can't tell by the data how you are even selecting each "set".

My favorite high school prank was the seniors releasing three little pigs in the building wearing tags labeled 1, 2, and 4:)
 

June7

AWF VIP
Local time
Today, 12:07
Joined
Mar 9, 2014
Messages
5,488
So exactly what did not work with suggestion from post #4?

I like the alternative for use of Conditional Formatting to hide number where appropriate. But the use of RunningSum is the same.

If you want to provide db for analysis, follow instructions at bottom of my post.
 

naobao

Registered User.
Local time
Today, 13:07
Joined
Feb 13, 2014
Messages
76
You want to show the record but not assign a serial number if ID = 0?

Use report RunningSum property set to OverAll. Expression in ControlSource like: =IIf(ID > 0, 1, 0).

Then some code behind report that hides/unhides the Serial textbox.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.tbxSerial.Visible = Me.tbxID > 0
End Sub

Or instead of VBA, set the RunningSum textbox as not visible and tbxSerial with expression: =IIf([ID] > 0, [tbxRunning], Null)
it works for me, Thanks!
 

naobao

Registered User.
Local time
Today, 13:07
Joined
Feb 13, 2014
Messages
76
You have to give people a little more than that to go on? :(
How do you decide on which label to start showing it on?

What is the field you are trying to use, or are you generating it on the fly?
Upload your db with enough data to show the problem and explicit instructions on how to recreate the issue.
Thank for reply, my problem is solve!
 

naobao

Registered User.
Local time
Today, 13:07
Joined
Feb 13, 2014
Messages
76
The requirement and the example seem really strange. What is the purpose of the labels? Why do you not want to number some of the cartons? I can't tell by the data how you are even selecting each "set".

My favorite high school prank was the seniors releasing three little pigs in the building wearing tags labeled 1, 2, and 4:)
Thank for reply, my problem is solve!
 

June7

AWF VIP
Local time
Today, 12:07
Joined
Mar 9, 2014
Messages
5,488
Post #12 seems to accept suggestion from post #4, perhaps as amended by post #6.
 

Users who are viewing this thread

Top Bottom