Batch Print not hide Controls

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
 
P

Pieter Wijnen

Check wether the OnFormat Property of the batch report reads [Event
Procedure]

Pieter

Bob V said:
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
 
B

Bob V

Pieter I can not find = On Format ...........Thanks Bob

"Pieter Wijnen"
Check wether the OnFormat Property of the batch report reads [Event
Procedure]

Pieter

Bob V said:
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
 
B

Bob V

Oops Sorry Pieter "You Where Right" Brilliant thanks for your effort..Bob
:)))

"Pieter Wijnen"
Check wether the OnFormat Property of the batch report reads [Event
Procedure]

Pieter

Bob V said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top