I'm trying to create Avery Labels using the reports in Access and have hit a bit of a glitch.
There are several fields where I have to put a Label in front of the actual field so that folks looking at the label know what the value ties to. So I have a label PKG in front of a field called PackageNumber.
Here's the point where I hit the speed bumb. I need the label PKG to only show up if there is actually text in the field PackageNumber. I tried to do conditional formatting on the label, so I could set it to white, but that's not an option.
So then I tried the following code, but it doesn't seem to work either.
I need the labels not to show so they don't print on labels where there is no data, otherwise I'll be wasting a lot of labels.
Any and all assistance is greatly appreciated.
Charis
There are several fields where I have to put a Label in front of the actual field so that folks looking at the label know what the value ties to. So I have a label PKG in front of a field called PackageNumber.
Here's the point where I hit the speed bumb. I need the label PKG to only show up if there is actually text in the field PackageNumber. I tried to do conditional formatting on the label, so I could set it to white, but that's not an option.
So then I tried the following code, but it doesn't seem to work either.
I need the labels not to show so they don't print on labels where there is no data, otherwise I'll be wasting a lot of labels.
Private Sub Labels_Avery5161_Make2_Open(Cancel As Integer)
'This routine is designed to change the text field labels to white font
'if the fields they are labeling are blank.
If Me.PackageNumber = IsNull Then
Me.PKG.ForeColor = RGB(255, 255, 255)
End If
If Me.PMISNumber = IsNull Then
Me.PMIS.ForeColor = RGB(255, 255, 255)
End If
If Me.Volume = IsNull Then
Me.VOL.ForeColor = RGB(255, 255, 255)
End If
End Sub
'This routine is designed to change the text field labels to white font
'if the fields they are labeling are blank.
If Me.PackageNumber = IsNull Then
Me.PKG.ForeColor = RGB(255, 255, 255)
End If
If Me.PMISNumber = IsNull Then
Me.PMIS.ForeColor = RGB(255, 255, 255)
End If
If Me.Volume = IsNull Then
Me.VOL.ForeColor = RGB(255, 255, 255)
End If
End Sub
Any and all assistance is greatly appreciated.
Charis