B
Bob V
This code works when I print a report singular but when I batch print (Which
is another report) it will not hide these controls
I have the same code on my other report
The controls are in my page footer
Thanks for any help......Bob
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error GoTo ProcError
lbBankName.Visible = Len([tbDirectBank] & vbNullString) > 0
lbBranch.Visible = Len([tbDirectBank] & vbNullString) > 0
lbAccountName.Visible = Len([tbDirectBank] & vbNullString) > 0
lbAccountNumber.Visible = Len([tbDirectBank] & vbNullString) > 0
lbTopLabel.Visible = Len([tbDirectBank] & vbNullString) > 0
lbBankCode.Visible = Len([tbDirectBank] & vbNullString) > 0
Line116.Visible = Len([tbDirectBank] & vbNullString) > 0
Line117.Visible = Len([tbDirectBank] & vbNullString) > 0
Line118.Visible = Len([tbDirectBank] & vbNullString) > 0
Line108.Visible = Len([tbDirectBank] & vbNullString) > 0
BoxC1.Visible = Len([tbCreditCard1] & vbNullString) > 0
BoxC2.Visible = Len([tbCreditCard1] & vbNullString) > 0
BoxC3.Visible = Len([tbCreditCard1] & vbNullString) > 0
tbCreditCard2.Visible = Len([tbCreditCard1] & vbNullString) > 0
tbCreditCard3.Visible = Len([tbCreditCard1] & vbNullString) > 0
lbName.Visible = Len([tbCreditCard1] & vbNullString) > 0
lbExpiry.Visible = Len([tbCreditCard1] & vbNullString) > 0
lbSignature.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box136.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box137.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box138.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box139.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box140.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box142.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box143.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box144.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box145.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box146.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box147.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box148.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box149.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box150.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box152.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box153.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box154.Visible = Len([tbCreditCard1] & vbNullString) > 0
Label166.Visible = Len([tbCreditCard1] & vbNullString) > 0
lbCreditCard.Visible = Len([tbCreditCard1] & vbNullString) > 0
Line169.Visible = Len([tbCreditCard1] & vbNullString) > 0
Line170.Visible = Len([tbCreditCard1] & vbNullString) > 0
BoxC2.Visible = Len([tbCreditCard2] & vbNullString) > 0
BoxC3.Visible = Len([tbCreditCard3] & vbNullString) > 0
ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, _
vbCritical, "Error in procedure Detail_Format..."
Resume ExitProc
End Sub
is another report) it will not hide these controls
I have the same code on my other report
The controls are in my page footer
Thanks for any help......Bob
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error GoTo ProcError
lbBankName.Visible = Len([tbDirectBank] & vbNullString) > 0
lbBranch.Visible = Len([tbDirectBank] & vbNullString) > 0
lbAccountName.Visible = Len([tbDirectBank] & vbNullString) > 0
lbAccountNumber.Visible = Len([tbDirectBank] & vbNullString) > 0
lbTopLabel.Visible = Len([tbDirectBank] & vbNullString) > 0
lbBankCode.Visible = Len([tbDirectBank] & vbNullString) > 0
Line116.Visible = Len([tbDirectBank] & vbNullString) > 0
Line117.Visible = Len([tbDirectBank] & vbNullString) > 0
Line118.Visible = Len([tbDirectBank] & vbNullString) > 0
Line108.Visible = Len([tbDirectBank] & vbNullString) > 0
BoxC1.Visible = Len([tbCreditCard1] & vbNullString) > 0
BoxC2.Visible = Len([tbCreditCard1] & vbNullString) > 0
BoxC3.Visible = Len([tbCreditCard1] & vbNullString) > 0
tbCreditCard2.Visible = Len([tbCreditCard1] & vbNullString) > 0
tbCreditCard3.Visible = Len([tbCreditCard1] & vbNullString) > 0
lbName.Visible = Len([tbCreditCard1] & vbNullString) > 0
lbExpiry.Visible = Len([tbCreditCard1] & vbNullString) > 0
lbSignature.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box136.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box137.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box138.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box139.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box140.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box142.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box143.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box144.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box145.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box146.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box147.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box148.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box149.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box150.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box152.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box153.Visible = Len([tbCreditCard1] & vbNullString) > 0
Box154.Visible = Len([tbCreditCard1] & vbNullString) > 0
Label166.Visible = Len([tbCreditCard1] & vbNullString) > 0
lbCreditCard.Visible = Len([tbCreditCard1] & vbNullString) > 0
Line169.Visible = Len([tbCreditCard1] & vbNullString) > 0
Line170.Visible = Len([tbCreditCard1] & vbNullString) > 0
BoxC2.Visible = Len([tbCreditCard2] & vbNullString) > 0
BoxC3.Visible = Len([tbCreditCard3] & vbNullString) > 0
ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, _
vbCritical, "Error in procedure Detail_Format..."
Resume ExitProc
End Sub