A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Footer only to appear once!



 
 
Thread Tools Display Modes
  #11  
Old September 19th, 2008, 07:54 AM posted to microsoft.public.access.reports
Bob Vance
external usenet poster
 
Posts: 726
Default Footer only to appear once!

Ok this is going to sound stupid ,I have 3 check boxes that make labels
Visible but they are in my Page footer but are under this:
I have tried putting your code every where but it just takes the footer
away...Thanks Bob

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error GoTo ProcError

If tbCreditCard = True Then


lbBankName.Visible = True
tbOwnerShortName.Visible = True
tbOwnerShortNumber.Visible = True
lbBranch.Visible = True
lbAccountName.Visible = True
lbAccountNumber.Visible = True
lbTopLabel.Visible = True
lbBankCode.Visible = True
Line116.Visible = True
Line117.Visible = True
Line118.Visible = True
Line108.Visible = True
BoxC2.Visible = True
BoxC3.Visible = True
lbCreditCard.Visible = True
tbCreditCard2.Visible = True
tbCreditCard3.Visible = True
lbName.Visible = True
lbExpiry.Visible = True
lbSignature.Visible = True
Box136.Visible = True
Box137.Visible = True
Box138.Visible = True
Box139.Visible = True
Box140.Visible = True
Box142.Visible = True
Box143.Visible = True
Box144.Visible = True
Box145.Visible = True
Box146.Visible = True
Box147.Visible = True
Box148.Visible = True
Box149.Visible = True
Box150.Visible = True
Box152.Visible = True
Box153.Visible = True
Line169.Visible = True
Line191.Visible = True
Line170.Visible = True
BoxC2.Visible = True
BoxC3.Visible = True
lblTick.Visible = True
BoxC1.Visible = True
tbCreditCard1.Visible = True
tbDirectBank.Visible = True
tbBranch.Visible = True
tbAccountName.Visible = True
tbAccountNumber.Visible = True
Line197.Visible = True
Line198.Visible = True
Line199.Visible = True
Line200.Visible = True
lblCheck1.Visible = True
lblCheck2.Visible = True
lblCheck3.Visible = True
tbChequePayableTo.Visible = True
tbCompanyAddress1.Visible = True
tbOwnerShortName.Visible = True
tbOwnerShortNumber.Visible = True
lblcash.Visible = False
lblCash1.Visible = False
Else
lbBankName.Visible = False
tbOwnerShortName.Visible = False
tbOwnerShortNumber.Visible = False
lbBranch.Visible = False
lbAccountName.Visible = False
lbAccountNumber.Visible = False
lbTopLabel.Visible = False
lbBankCode.Visible = False
Line116.Visible = False
Line117.Visible = False
Line118.Visible = False
Line108.Visible = False
BoxC2.Visible = False
BoxC3.Visible = False
lbCreditCard.Visible = False
tbCreditCard2.Visible = False
tbCreditCard3.Visible = False
lbName.Visible = False
lbExpiry.Visible = False
lbSignature.Visible = False
Box136.Visible = False
Box137.Visible = False
Box138.Visible = False
Box139.Visible = False
Box140.Visible = False
Box142.Visible = False
Box143.Visible = False
Box144.Visible = False
Box145.Visible = False
Box146.Visible = False
Box147.Visible = False
Box148.Visible = False
Box149.Visible = False
Box150.Visible = False
Box152.Visible = False
Box153.Visible = False
Line169.Visible = False
Line191.Visible = False
Line170.Visible = False
BoxC2.Visible = False
BoxC3.Visible = False
lblTick.Visible = False
BoxC1.Visible = False
tbCreditCard1.Visible = False
tbDirectBank.Visible = False
tbBranch.Visible = False
tbAccountName.Visible = False
tbAccountNumber.Visible = False
Line197.Visible = False
Line198.Visible = False
Line199.Visible = False
Line200.Visible = False
lblCheck1.Visible = False
lblCheck2.Visible = False
lblCheck3.Visible = False
tbChequePayableTo.Visible = False
tbCompanyAddress1.Visible = False
tbOwnerShortName.Visible = False
tbOwnerShortNumber.Visible = False
lblcash.Visible = True
lblCash1.Visible = True

If tbNoCreditCard = True Then
lbBankName.Visible = True
tbOwnerShortName.Visible = True
tbOwnerShortNumber.Visible = True
lbBranch.Visible = True
lbAccountName.Visible = True
lbAccountNumber.Visible = True
lbTopLabel.Visible = True
lbBankCode.Visible = True
Line116.Visible = True
Line117.Visible = True
Line118.Visible = True
Line108.Visible = True
BoxC2.Visible = False
BoxC3.Visible = False
lbCreditCard.Visible = False
tbCreditCard2.Visible = False
tbCreditCard3.Visible = False
lbName.Visible = False
lbExpiry.Visible = False
lbSignature.Visible = False
Box136.Visible = False
Box137.Visible = False
Box138.Visible = False
Box139.Visible = False
Box140.Visible = False
Box142.Visible = False
Box143.Visible = False
Box144.Visible = False
Box145.Visible = False
Box146.Visible = False
Box147.Visible = False
Box148.Visible = False
Box149.Visible = False
Box150.Visible = False
Box152.Visible = False
Box153.Visible = False
Line169.Visible = False
Line191.Visible = False
Line170.Visible = False
BoxC2.Visible = False
BoxC3.Visible = False
lblTick.Visible = False
BoxC1.Visible = False
tbCreditCard1.Visible = False
tbDirectBank.Visible = True
tbBranch.Visible = True
tbAccountName.Visible = True
tbAccountNumber.Visible = True
Line197.Visible = True
Line198.Visible = True
Line199.Visible = True
Line200.Visible = True
lblCheck1.Visible = True
lblCheck2.Visible = True
lblCheck3.Visible = True
tbChequePayableTo.Visible = True
tbCompanyAddress1.Visible = True
tbOwnerShortName.Visible = True
tbOwnerShortNumber.Visible = True
lblcash.Visible = False
lblCash1.Visible = False
Else

lbBankName.Visible = False
tbOwnerShortName.Visible = False
tbOwnerShortNumber.Visible = False
lbBranch.Visible = False
lbAccountName.Visible = False
lbAccountNumber.Visible = False
lbTopLabel.Visible = False
lbBankCode.Visible = False
Line116.Visible = False
Line117.Visible = False
Line118.Visible = False
Line108.Visible = False
BoxC2.Visible = True
BoxC3.Visible = True
lbCreditCard.Visible = True
tbCreditCard2.Visible = True
tbCreditCard3.Visible = True
lbName.Visible = True
lbExpiry.Visible = True
lbSignature.Visible = True
Box136.Visible = True
Box137.Visible = True
Box138.Visible = True
Box139.Visible = True
Box140.Visible = True
Box142.Visible = True
Box143.Visible = True
Box144.Visible = True
Box145.Visible = True
Box146.Visible = True
Box147.Visible = True
Box148.Visible = True
Box149.Visible = True
Box150.Visible = True
Box152.Visible = True
Box153.Visible = True
Line169.Visible = True
Line191.Visible = True
Line170.Visible = True
BoxC2.Visible = True
BoxC3.Visible = True
lblTick.Visible = True
BoxC1.Visible = True
tbCreditCard1.Visible = True
tbDirectBank.Visible = False
tbBranch.Visible = False
tbAccountName.Visible = False
tbAccountNumber.Visible = False
Line197.Visible = False
Line198.Visible = False
Line199.Visible = False
Line200.Visible = False
lblCheck1.Visible = False
lblCheck2.Visible = False
lblCheck3.Visible = False
tbChequePayableTo.Visible = False
tbCompanyAddress1.Visible = False
tbOwnerShortName.Visible = False
tbOwnerShortNumber.Visible = False
lblcash.Visible = True
lblCash1.Visible = True

If tbCash = True Then
lbBankName.Visible = False
tbOwnerShortName.Visible = False
tbOwnerShortNumber.Visible = False
lbBranch.Visible = False
lbAccountName.Visible = False
lbAccountNumber.Visible = False
lbTopLabel.Visible = False
lbBankCode.Visible = False
Line116.Visible = False
Line117.Visible = False
Line118.Visible = False
Line108.Visible = False
BoxC2.Visible = False
BoxC3.Visible = False
lbCreditCard.Visible = False
tbCreditCard2.Visible = False
tbCreditCard3.Visible = False
lbName.Visible = False
lbExpiry.Visible = False
lbSignature.Visible = False
Box136.Visible = False
Box137.Visible = False
Box138.Visible = False
Box139.Visible = False
Box140.Visible = False
Box142.Visible = False
Box143.Visible = False
Box144.Visible = False
Box145.Visible = False
Box146.Visible = False
Box147.Visible = False
Box148.Visible = False
Box149.Visible = False
Box150.Visible = False
Box152.Visible = False
Box153.Visible = False
Line169.Visible = False
Line191.Visible = False
Line170.Visible = False
BoxC2.Visible = False
BoxC3.Visible = False
lblTick.Visible = False
BoxC1.Visible = False
tbCreditCard1.Visible = False
tbDirectBank.Visible = False
tbBranch.Visible = False
tbAccountName.Visible = False
tbAccountNumber.Visible = False
Line197.Visible = False
Line198.Visible = False
Line199.Visible = False
Line200.Visible = False
lblCheck1.Visible = False
lblCheck2.Visible = False
lblCheck3.Visible = False
tbChequePayableTo.Visible = False
tbCompanyAddress1.Visible = False
tbOwnerShortName.Visible = False
tbOwnerShortNumber.Visible = False
lblCash1.Visible = True
Else
lbBankName.Visible = True
tbOwnerShortName.Visible = True
tbOwnerShortNumber.Visible = True
lbBranch.Visible = True
lbAccountName.Visible = True
lbAccountNumber.Visible = True
lbTopLabel.Visible = True
lbBankCode.Visible = True
Line116.Visible = True
Line117.Visible = True
Line118.Visible = True
Line108.Visible = True
BoxC2.Visible = True
BoxC3.Visible = True
lbCreditCard.Visible = True
tbCreditCard2.Visible = True
tbCreditCard3.Visible = True
lbName.Visible = True
lbExpiry.Visible = True
lbSignature.Visible = True
Box136.Visible = True
Box137.Visible = True
Box138.Visible = True
Box139.Visible = True
Box140.Visible = True
Box142.Visible = True
Box143.Visible = True
Box144.Visible = True
Box145.Visible = True
Box146.Visible = True
Box147.Visible = True
Box148.Visible = True
Box149.Visible = True
Box150.Visible = True
Box152.Visible = True
Box153.Visible = True
Line169.Visible = True
Line191.Visible = True
Line170.Visible = True
BoxC2.Visible = True
BoxC3.Visible = True
lblTick.Visible = True
BoxC1.Visible = True
tbCreditCard1.Visible = True
tbDirectBank.Visible = True
tbBranch.Visible = True
tbAccountName.Visible = True
tbAccountNumber.Visible = True
Line197.Visible = True
Line198.Visible = True
Line199.Visible = True
Line200.Visible = True
lblCheck1.Visible = True
lblCheck2.Visible = True
lblCheck3.Visible = True
tbChequePayableTo.Visible = True
tbCompanyAddress1.Visible = True
tbOwnerShortName.Visible = True
tbOwnerShortNumber.Visible = True
lblCash1.Visible = False

ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, _
vbCritical, "Error in procedure Detail_Format..."
Resume ExitProc
End If
End If
End If
End Sub

Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As
Integer)
Me.Section(4).Visible = (Me.Page = Me.Pages)

End Sub

"Marshall Barton" wrote in message
...
Bob Vance wrote:

lblCash is just a label in my header that shows when there
is a true in the command to open the report!
I have done what you said , but my Pagefooter dosent appear on the last
page
or any page actually

Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As
Integer)
Me.Section(4).Visible = (Me.Page = Me.Pages)

End Sub



The only reasons I can think of to explain why that didn't
work is:

a) Pages was not used in a text box expression

b) There is something else in the report's code that's
messing with the page number

c) You did not remove that code from the page header's
event.

--
Marsh
MVP [MS Access]



  #12  
Old September 19th, 2008, 09:57 AM posted to microsoft.public.access.reports
Bob Vance
external usenet poster
 
Posts: 726
Default Footer only to appear once!

Thanks Marshall . Ive got it , put the code in the header, and put the page
of pages there too BRILLIANT......Thanks Bob
"Bob Vance" wrote in message
...
Ok this is going to sound stupid ,I have 3 check boxes that make labels
Visible but they are in my Page footer but are under this:
I have tried putting your code every where but it just takes the footer
away...Thanks Bob

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error GoTo ProcError

If tbCreditCard = True Then


lbBankName.Visible = True
tbOwnerShortName.Visible = True
tbOwnerShortNumber.Visible = True
lbBranch.Visible = True
lbAccountName.Visible = True
lbAccountNumber.Visible = True
lbTopLabel.Visible = True
lbBankCode.Visible = True
Line116.Visible = True
Line117.Visible = True
Line118.Visible = True
Line108.Visible = True
BoxC2.Visible = True
BoxC3.Visible = True
lbCreditCard.Visible = True
tbCreditCard2.Visible = True
tbCreditCard3.Visible = True
lbName.Visible = True
lbExpiry.Visible = True
lbSignature.Visible = True
Box136.Visible = True
Box137.Visible = True
Box138.Visible = True
Box139.Visible = True
Box140.Visible = True
Box142.Visible = True
Box143.Visible = True
Box144.Visible = True
Box145.Visible = True
Box146.Visible = True
Box147.Visible = True
Box148.Visible = True
Box149.Visible = True
Box150.Visible = True
Box152.Visible = True
Box153.Visible = True
Line169.Visible = True
Line191.Visible = True
Line170.Visible = True
BoxC2.Visible = True
BoxC3.Visible = True
lblTick.Visible = True
BoxC1.Visible = True
tbCreditCard1.Visible = True
tbDirectBank.Visible = True
tbBranch.Visible = True
tbAccountName.Visible = True
tbAccountNumber.Visible = True
Line197.Visible = True
Line198.Visible = True
Line199.Visible = True
Line200.Visible = True
lblCheck1.Visible = True
lblCheck2.Visible = True
lblCheck3.Visible = True
tbChequePayableTo.Visible = True
tbCompanyAddress1.Visible = True
tbOwnerShortName.Visible = True
tbOwnerShortNumber.Visible = True
lblcash.Visible = False
lblCash1.Visible = False
Else
lbBankName.Visible = False
tbOwnerShortName.Visible = False
tbOwnerShortNumber.Visible = False
lbBranch.Visible = False
lbAccountName.Visible = False
lbAccountNumber.Visible = False
lbTopLabel.Visible = False
lbBankCode.Visible = False
Line116.Visible = False
Line117.Visible = False
Line118.Visible = False
Line108.Visible = False
BoxC2.Visible = False
BoxC3.Visible = False
lbCreditCard.Visible = False
tbCreditCard2.Visible = False
tbCreditCard3.Visible = False
lbName.Visible = False
lbExpiry.Visible = False
lbSignature.Visible = False
Box136.Visible = False
Box137.Visible = False
Box138.Visible = False
Box139.Visible = False
Box140.Visible = False
Box142.Visible = False
Box143.Visible = False
Box144.Visible = False
Box145.Visible = False
Box146.Visible = False
Box147.Visible = False
Box148.Visible = False
Box149.Visible = False
Box150.Visible = False
Box152.Visible = False
Box153.Visible = False
Line169.Visible = False
Line191.Visible = False
Line170.Visible = False
BoxC2.Visible = False
BoxC3.Visible = False
lblTick.Visible = False
BoxC1.Visible = False
tbCreditCard1.Visible = False
tbDirectBank.Visible = False
tbBranch.Visible = False
tbAccountName.Visible = False
tbAccountNumber.Visible = False
Line197.Visible = False
Line198.Visible = False
Line199.Visible = False
Line200.Visible = False
lblCheck1.Visible = False
lblCheck2.Visible = False
lblCheck3.Visible = False
tbChequePayableTo.Visible = False
tbCompanyAddress1.Visible = False
tbOwnerShortName.Visible = False
tbOwnerShortNumber.Visible = False
lblcash.Visible = True
lblCash1.Visible = True

If tbNoCreditCard = True Then
lbBankName.Visible = True
tbOwnerShortName.Visible = True
tbOwnerShortNumber.Visible = True
lbBranch.Visible = True
lbAccountName.Visible = True
lbAccountNumber.Visible = True
lbTopLabel.Visible = True
lbBankCode.Visible = True
Line116.Visible = True
Line117.Visible = True
Line118.Visible = True
Line108.Visible = True
BoxC2.Visible = False
BoxC3.Visible = False
lbCreditCard.Visible = False
tbCreditCard2.Visible = False
tbCreditCard3.Visible = False
lbName.Visible = False
lbExpiry.Visible = False
lbSignature.Visible = False
Box136.Visible = False
Box137.Visible = False
Box138.Visible = False
Box139.Visible = False
Box140.Visible = False
Box142.Visible = False
Box143.Visible = False
Box144.Visible = False
Box145.Visible = False
Box146.Visible = False
Box147.Visible = False
Box148.Visible = False
Box149.Visible = False
Box150.Visible = False
Box152.Visible = False
Box153.Visible = False
Line169.Visible = False
Line191.Visible = False
Line170.Visible = False
BoxC2.Visible = False
BoxC3.Visible = False
lblTick.Visible = False
BoxC1.Visible = False
tbCreditCard1.Visible = False
tbDirectBank.Visible = True
tbBranch.Visible = True
tbAccountName.Visible = True
tbAccountNumber.Visible = True
Line197.Visible = True
Line198.Visible = True
Line199.Visible = True
Line200.Visible = True
lblCheck1.Visible = True
lblCheck2.Visible = True
lblCheck3.Visible = True
tbChequePayableTo.Visible = True
tbCompanyAddress1.Visible = True
tbOwnerShortName.Visible = True
tbOwnerShortNumber.Visible = True
lblcash.Visible = False
lblCash1.Visible = False
Else

lbBankName.Visible = False
tbOwnerShortName.Visible = False
tbOwnerShortNumber.Visible = False
lbBranch.Visible = False
lbAccountName.Visible = False
lbAccountNumber.Visible = False
lbTopLabel.Visible = False
lbBankCode.Visible = False
Line116.Visible = False
Line117.Visible = False
Line118.Visible = False
Line108.Visible = False
BoxC2.Visible = True
BoxC3.Visible = True
lbCreditCard.Visible = True
tbCreditCard2.Visible = True
tbCreditCard3.Visible = True
lbName.Visible = True
lbExpiry.Visible = True
lbSignature.Visible = True
Box136.Visible = True
Box137.Visible = True
Box138.Visible = True
Box139.Visible = True
Box140.Visible = True
Box142.Visible = True
Box143.Visible = True
Box144.Visible = True
Box145.Visible = True
Box146.Visible = True
Box147.Visible = True
Box148.Visible = True
Box149.Visible = True
Box150.Visible = True
Box152.Visible = True
Box153.Visible = True
Line169.Visible = True
Line191.Visible = True
Line170.Visible = True
BoxC2.Visible = True
BoxC3.Visible = True
lblTick.Visible = True
BoxC1.Visible = True
tbCreditCard1.Visible = True
tbDirectBank.Visible = False
tbBranch.Visible = False
tbAccountName.Visible = False
tbAccountNumber.Visible = False
Line197.Visible = False
Line198.Visible = False
Line199.Visible = False
Line200.Visible = False
lblCheck1.Visible = False
lblCheck2.Visible = False
lblCheck3.Visible = False
tbChequePayableTo.Visible = False
tbCompanyAddress1.Visible = False
tbOwnerShortName.Visible = False
tbOwnerShortNumber.Visible = False
lblcash.Visible = True
lblCash1.Visible = True

If tbCash = True Then
lbBankName.Visible = False
tbOwnerShortName.Visible = False
tbOwnerShortNumber.Visible = False
lbBranch.Visible = False
lbAccountName.Visible = False
lbAccountNumber.Visible = False
lbTopLabel.Visible = False
lbBankCode.Visible = False
Line116.Visible = False
Line117.Visible = False
Line118.Visible = False
Line108.Visible = False
BoxC2.Visible = False
BoxC3.Visible = False
lbCreditCard.Visible = False
tbCreditCard2.Visible = False
tbCreditCard3.Visible = False
lbName.Visible = False
lbExpiry.Visible = False
lbSignature.Visible = False
Box136.Visible = False
Box137.Visible = False
Box138.Visible = False
Box139.Visible = False
Box140.Visible = False
Box142.Visible = False
Box143.Visible = False
Box144.Visible = False
Box145.Visible = False
Box146.Visible = False
Box147.Visible = False
Box148.Visible = False
Box149.Visible = False
Box150.Visible = False
Box152.Visible = False
Box153.Visible = False
Line169.Visible = False
Line191.Visible = False
Line170.Visible = False
BoxC2.Visible = False
BoxC3.Visible = False
lblTick.Visible = False
BoxC1.Visible = False
tbCreditCard1.Visible = False
tbDirectBank.Visible = False
tbBranch.Visible = False
tbAccountName.Visible = False
tbAccountNumber.Visible = False
Line197.Visible = False
Line198.Visible = False
Line199.Visible = False
Line200.Visible = False
lblCheck1.Visible = False
lblCheck2.Visible = False
lblCheck3.Visible = False
tbChequePayableTo.Visible = False
tbCompanyAddress1.Visible = False
tbOwnerShortName.Visible = False
tbOwnerShortNumber.Visible = False
lblCash1.Visible = True
Else
lbBankName.Visible = True
tbOwnerShortName.Visible = True
tbOwnerShortNumber.Visible = True
lbBranch.Visible = True
lbAccountName.Visible = True
lbAccountNumber.Visible = True
lbTopLabel.Visible = True
lbBankCode.Visible = True
Line116.Visible = True
Line117.Visible = True
Line118.Visible = True
Line108.Visible = True
BoxC2.Visible = True
BoxC3.Visible = True
lbCreditCard.Visible = True
tbCreditCard2.Visible = True
tbCreditCard3.Visible = True
lbName.Visible = True
lbExpiry.Visible = True
lbSignature.Visible = True
Box136.Visible = True
Box137.Visible = True
Box138.Visible = True
Box139.Visible = True
Box140.Visible = True
Box142.Visible = True
Box143.Visible = True
Box144.Visible = True
Box145.Visible = True
Box146.Visible = True
Box147.Visible = True
Box148.Visible = True
Box149.Visible = True
Box150.Visible = True
Box152.Visible = True
Box153.Visible = True
Line169.Visible = True
Line191.Visible = True
Line170.Visible = True
BoxC2.Visible = True
BoxC3.Visible = True
lblTick.Visible = True
BoxC1.Visible = True
tbCreditCard1.Visible = True
tbDirectBank.Visible = True
tbBranch.Visible = True
tbAccountName.Visible = True
tbAccountNumber.Visible = True
Line197.Visible = True
Line198.Visible = True
Line199.Visible = True
Line200.Visible = True
lblCheck1.Visible = True
lblCheck2.Visible = True
lblCheck3.Visible = True
tbChequePayableTo.Visible = True
tbCompanyAddress1.Visible = True
tbOwnerShortName.Visible = True
tbOwnerShortNumber.Visible = True
lblCash1.Visible = False

ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, _
vbCritical, "Error in procedure Detail_Format..."
Resume ExitProc
End If
End If
End If
End Sub

Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As
Integer)
Me.Section(4).Visible = (Me.Page = Me.Pages)

End Sub

"Marshall Barton" wrote in message
...
Bob Vance wrote:

lblCash is just a label in my header that shows when there
is a true in the command to open the report!
I have done what you said , but my Pagefooter dosent appear on the last
page
or any page actually

Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As
Integer)
Me.Section(4).Visible = (Me.Page = Me.Pages)

End Sub



The only reasons I can think of to explain why that didn't
work is:

a) Pages was not used in a text box expression

b) There is something else in the report's code that's
messing with the page number

c) You did not remove that code from the page header's
event.

--
Marsh
MVP [MS Access]





  #13  
Old September 19th, 2008, 10:18 AM posted to microsoft.public.access.reports
Bob Vance
external usenet poster
 
Posts: 726
Default Footer only to appear once!

Marshall, Oops not quite working page 1 of 1 will not show footer, and any
last page that the footer wont fit will not show , my footer is 1/3 of a
page so if page 2 finishes in that area it wont show footer....Regards Bob

"Bob Vance" wrote in message
...
Thanks Marshall . Ive got it , put the code in the header, and put the
page of pages there too BRILLIANT......Thanks Bob
"Bob Vance" wrote in message
...
Ok this is going to sound stupid ,I have 3 check boxes that make labels
Visible but they are in my Page footer but are under this:
I have tried putting your code every where but it just takes the footer
away...Thanks Bob

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error GoTo ProcError

If tbCreditCard = True Then


lbBankName.Visible = True
tbOwnerShortName.Visible = True
tbOwnerShortNumber.Visible = True
lbBranch.Visible = True
lbAccountName.Visible = True
lbAccountNumber.Visible = True
lbTopLabel.Visible = True
lbBankCode.Visible = True
Line116.Visible = True
Line117.Visible = True
Line118.Visible = True
Line108.Visible = True
BoxC2.Visible = True
BoxC3.Visible = True
lbCreditCard.Visible = True
tbCreditCard2.Visible = True
tbCreditCard3.Visible = True
lbName.Visible = True
lbExpiry.Visible = True
lbSignature.Visible = True
Box136.Visible = True
Box137.Visible = True
Box138.Visible = True
Box139.Visible = True
Box140.Visible = True
Box142.Visible = True
Box143.Visible = True
Box144.Visible = True
Box145.Visible = True
Box146.Visible = True
Box147.Visible = True
Box148.Visible = True
Box149.Visible = True
Box150.Visible = True
Box152.Visible = True
Box153.Visible = True
Line169.Visible = True
Line191.Visible = True
Line170.Visible = True
BoxC2.Visible = True
BoxC3.Visible = True
lblTick.Visible = True
BoxC1.Visible = True
tbCreditCard1.Visible = True
tbDirectBank.Visible = True
tbBranch.Visible = True
tbAccountName.Visible = True
tbAccountNumber.Visible = True
Line197.Visible = True
Line198.Visible = True
Line199.Visible = True
Line200.Visible = True
lblCheck1.Visible = True
lblCheck2.Visible = True
lblCheck3.Visible = True
tbChequePayableTo.Visible = True
tbCompanyAddress1.Visible = True
tbOwnerShortName.Visible = True
tbOwnerShortNumber.Visible = True
lblcash.Visible = False
lblCash1.Visible = False
Else
lbBankName.Visible = False
tbOwnerShortName.Visible = False
tbOwnerShortNumber.Visible = False
lbBranch.Visible = False
lbAccountName.Visible = False
lbAccountNumber.Visible = False
lbTopLabel.Visible = False
lbBankCode.Visible = False
Line116.Visible = False
Line117.Visible = False
Line118.Visible = False
Line108.Visible = False
BoxC2.Visible = False
BoxC3.Visible = False
lbCreditCard.Visible = False
tbCreditCard2.Visible = False
tbCreditCard3.Visible = False
lbName.Visible = False
lbExpiry.Visible = False
lbSignature.Visible = False
Box136.Visible = False
Box137.Visible = False
Box138.Visible = False
Box139.Visible = False
Box140.Visible = False
Box142.Visible = False
Box143.Visible = False
Box144.Visible = False
Box145.Visible = False
Box146.Visible = False
Box147.Visible = False
Box148.Visible = False
Box149.Visible = False
Box150.Visible = False
Box152.Visible = False
Box153.Visible = False
Line169.Visible = False
Line191.Visible = False
Line170.Visible = False
BoxC2.Visible = False
BoxC3.Visible = False
lblTick.Visible = False
BoxC1.Visible = False
tbCreditCard1.Visible = False
tbDirectBank.Visible = False
tbBranch.Visible = False
tbAccountName.Visible = False
tbAccountNumber.Visible = False
Line197.Visible = False
Line198.Visible = False
Line199.Visible = False
Line200.Visible = False
lblCheck1.Visible = False
lblCheck2.Visible = False
lblCheck3.Visible = False
tbChequePayableTo.Visible = False
tbCompanyAddress1.Visible = False
tbOwnerShortName.Visible = False
tbOwnerShortNumber.Visible = False
lblcash.Visible = True
lblCash1.Visible = True

If tbNoCreditCard = True Then
lbBankName.Visible = True
tbOwnerShortName.Visible = True
tbOwnerShortNumber.Visible = True
lbBranch.Visible = True
lbAccountName.Visible = True
lbAccountNumber.Visible = True
lbTopLabel.Visible = True
lbBankCode.Visible = True
Line116.Visible = True
Line117.Visible = True
Line118.Visible = True
Line108.Visible = True
BoxC2.Visible = False
BoxC3.Visible = False
lbCreditCard.Visible = False
tbCreditCard2.Visible = False
tbCreditCard3.Visible = False
lbName.Visible = False
lbExpiry.Visible = False
lbSignature.Visible = False
Box136.Visible = False
Box137.Visible = False
Box138.Visible = False
Box139.Visible = False
Box140.Visible = False
Box142.Visible = False
Box143.Visible = False
Box144.Visible = False
Box145.Visible = False
Box146.Visible = False
Box147.Visible = False
Box148.Visible = False
Box149.Visible = False
Box150.Visible = False
Box152.Visible = False
Box153.Visible = False
Line169.Visible = False
Line191.Visible = False
Line170.Visible = False
BoxC2.Visible = False
BoxC3.Visible = False
lblTick.Visible = False
BoxC1.Visible = False
tbCreditCard1.Visible = False
tbDirectBank.Visible = True
tbBranch.Visible = True
tbAccountName.Visible = True
tbAccountNumber.Visible = True
Line197.Visible = True
Line198.Visible = True
Line199.Visible = True
Line200.Visible = True
lblCheck1.Visible = True
lblCheck2.Visible = True
lblCheck3.Visible = True
tbChequePayableTo.Visible = True
tbCompanyAddress1.Visible = True
tbOwnerShortName.Visible = True
tbOwnerShortNumber.Visible = True
lblcash.Visible = False
lblCash1.Visible = False
Else

lbBankName.Visible = False
tbOwnerShortName.Visible = False
tbOwnerShortNumber.Visible = False
lbBranch.Visible = False
lbAccountName.Visible = False
lbAccountNumber.Visible = False
lbTopLabel.Visible = False
lbBankCode.Visible = False
Line116.Visible = False
Line117.Visible = False
Line118.Visible = False
Line108.Visible = False
BoxC2.Visible = True
BoxC3.Visible = True
lbCreditCard.Visible = True
tbCreditCard2.Visible = True
tbCreditCard3.Visible = True
lbName.Visible = True
lbExpiry.Visible = True
lbSignature.Visible = True
Box136.Visible = True
Box137.Visible = True
Box138.Visible = True
Box139.Visible = True
Box140.Visible = True
Box142.Visible = True
Box143.Visible = True
Box144.Visible = True
Box145.Visible = True
Box146.Visible = True
Box147.Visible = True
Box148.Visible = True
Box149.Visible = True
Box150.Visible = True
Box152.Visible = True
Box153.Visible = True
Line169.Visible = True
Line191.Visible = True
Line170.Visible = True
BoxC2.Visible = True
BoxC3.Visible = True
lblTick.Visible = True
BoxC1.Visible = True
tbCreditCard1.Visible = True
tbDirectBank.Visible = False
tbBranch.Visible = False
tbAccountName.Visible = False
tbAccountNumber.Visible = False
Line197.Visible = False
Line198.Visible = False
Line199.Visible = False
Line200.Visible = False
lblCheck1.Visible = False
lblCheck2.Visible = False
lblCheck3.Visible = False
tbChequePayableTo.Visible = False
tbCompanyAddress1.Visible = False
tbOwnerShortName.Visible = False
tbOwnerShortNumber.Visible = False
lblcash.Visible = True
lblCash1.Visible = True

If tbCash = True Then
lbBankName.Visible = False
tbOwnerShortName.Visible = False
tbOwnerShortNumber.Visible = False
lbBranch.Visible = False
lbAccountName.Visible = False
lbAccountNumber.Visible = False
lbTopLabel.Visible = False
lbBankCode.Visible = False
Line116.Visible = False
Line117.Visible = False
Line118.Visible = False
Line108.Visible = False
BoxC2.Visible = False
BoxC3.Visible = False
lbCreditCard.Visible = False
tbCreditCard2.Visible = False
tbCreditCard3.Visible = False
lbName.Visible = False
lbExpiry.Visible = False
lbSignature.Visible = False
Box136.Visible = False
Box137.Visible = False
Box138.Visible = False
Box139.Visible = False
Box140.Visible = False
Box142.Visible = False
Box143.Visible = False
Box144.Visible = False
Box145.Visible = False
Box146.Visible = False
Box147.Visible = False
Box148.Visible = False
Box149.Visible = False
Box150.Visible = False
Box152.Visible = False
Box153.Visible = False
Line169.Visible = False
Line191.Visible = False
Line170.Visible = False
BoxC2.Visible = False
BoxC3.Visible = False
lblTick.Visible = False
BoxC1.Visible = False
tbCreditCard1.Visible = False
tbDirectBank.Visible = False
tbBranch.Visible = False
tbAccountName.Visible = False
tbAccountNumber.Visible = False
Line197.Visible = False
Line198.Visible = False
Line199.Visible = False
Line200.Visible = False
lblCheck1.Visible = False
lblCheck2.Visible = False
lblCheck3.Visible = False
tbChequePayableTo.Visible = False
tbCompanyAddress1.Visible = False
tbOwnerShortName.Visible = False
tbOwnerShortNumber.Visible = False
lblCash1.Visible = True
Else
lbBankName.Visible = True
tbOwnerShortName.Visible = True
tbOwnerShortNumber.Visible = True
lbBranch.Visible = True
lbAccountName.Visible = True
lbAccountNumber.Visible = True
lbTopLabel.Visible = True
lbBankCode.Visible = True
Line116.Visible = True
Line117.Visible = True
Line118.Visible = True
Line108.Visible = True
BoxC2.Visible = True
BoxC3.Visible = True
lbCreditCard.Visible = True
tbCreditCard2.Visible = True
tbCreditCard3.Visible = True
lbName.Visible = True
lbExpiry.Visible = True
lbSignature.Visible = True
Box136.Visible = True
Box137.Visible = True
Box138.Visible = True
Box139.Visible = True
Box140.Visible = True
Box142.Visible = True
Box143.Visible = True
Box144.Visible = True
Box145.Visible = True
Box146.Visible = True
Box147.Visible = True
Box148.Visible = True
Box149.Visible = True
Box150.Visible = True
Box152.Visible = True
Box153.Visible = True
Line169.Visible = True
Line191.Visible = True
Line170.Visible = True
BoxC2.Visible = True
BoxC3.Visible = True
lblTick.Visible = True
BoxC1.Visible = True
tbCreditCard1.Visible = True
tbDirectBank.Visible = True
tbBranch.Visible = True
tbAccountName.Visible = True
tbAccountNumber.Visible = True
Line197.Visible = True
Line198.Visible = True
Line199.Visible = True
Line200.Visible = True
lblCheck1.Visible = True
lblCheck2.Visible = True
lblCheck3.Visible = True
tbChequePayableTo.Visible = True
tbCompanyAddress1.Visible = True
tbOwnerShortName.Visible = True
tbOwnerShortNumber.Visible = True
lblCash1.Visible = False

ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, _
vbCritical, "Error in procedure Detail_Format..."
Resume ExitProc
End If
End If
End If
End Sub

Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As
Integer)
Me.Section(4).Visible = (Me.Page = Me.Pages)

End Sub

"Marshall Barton" wrote in message
...
Bob Vance wrote:

lblCash is just a label in my header that shows when there
is a true in the command to open the report!
I have done what you said , but my Pagefooter dosent appear on the last
page
or any page actually

Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As
Integer)
Me.Section(4).Visible = (Me.Page = Me.Pages)

End Sub


The only reasons I can think of to explain why that didn't
work is:

a) Pages was not used in a text box expression

b) There is something else in the report's code that's
messing with the page number

c) You did not remove that code from the page header's
event.

--
Marsh
MVP [MS Access]







  #14  
Old September 19th, 2008, 08:12 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Footer only to appear once!

Bob Vance wrote:

Marshall, Oops not quite working page 1 of 1 will not show footer, and any
last page that the footer wont fit will not show , my footer is 1/3 of a
page so if page 2 finishes in that area it wont show footer....Regards Bob



That's the problem I tried to explain before.

With the page footer taking up 1/3 of the page, you clearly
need its space on all but the last page. Unfortunately, no
matter what tricks I try, I can not get the page 1 of 1
scenario to work. Even though the page footer's Visible
property is True, it still doesn't display on the first
page.

I think it's time to give up on using the page footer. How
about using the report footer instead? Is it really
critical that the last page info be at the bottom of the
page?

--
Marsh
MVP [MS Access]
  #15  
Old September 20th, 2008, 12:26 AM posted to microsoft.public.access.reports
Bob Vance
external usenet poster
 
Posts: 726
Default Footer only to appear once!

Thanks Marshall you your effort and response, I actually made my footer 1/3
of the page so as after it is folded and posted the bottom part could be cut
off and posted back
If I made it smaller would it work?
Most of my clients don't push into page 2!
What if I create another report as well with a Report Footer then have a
code "if page one print this report!
Then I come to another problem as I have a batch print that prints off all
my Statements
I suppose in a perfect world , if only page 1 page footer if more than page
1 report footer
Thanks............Bob
"Marshall Barton" wrote in message
...
Bob Vance wrote:

Marshall, Oops not quite working page 1 of 1 will not show footer, and any
last page that the footer wont fit will not show , my footer is 1/3 of a
page so if page 2 finishes in that area it wont show footer....Regards Bob



That's the problem I tried to explain before.

With the page footer taking up 1/3 of the page, you clearly
need its space on all but the last page. Unfortunately, no
matter what tricks I try, I can not get the page 1 of 1
scenario to work. Even though the page footer's Visible
property is True, it still doesn't display on the first
page.

I think it's time to give up on using the page footer. How
about using the report footer instead? Is it really
critical that the last page info be at the bottom of the
page?

--
Marsh
MVP [MS Access]



  #16  
Old September 20th, 2008, 12:43 AM posted to microsoft.public.access.reports
Bob Vance
external usenet poster
 
Posts: 726
Default Footer only to appear once!

OK got this figured now
(a)The code never shows the page footer on Page1 of 1 even if i just show
one record in the Sub/Report
(b) shows the page footer when more than 1 page only IF there is enough room
on the page otherwise no page footer
Regards Bob


"Bob Vance" wrote in message
...
Thanks Marshall you your effort and response, I actually made my footer
1/3 of the page so as after it is folded and posted the bottom part could
be cut off and posted back
If I made it smaller would it work?
Most of my clients don't push into page 2!
What if I create another report as well with a Report Footer then have a
code "if page one print this report!
Then I come to another problem as I have a batch print that prints off all
my Statements
I suppose in a perfect world , if only page 1 page footer if more than
page 1 report footer
Thanks............Bob
"Marshall Barton" wrote in message
...
Bob Vance wrote:

Marshall, Oops not quite working page 1 of 1 will not show footer, and
any
last page that the footer wont fit will not show , my footer is 1/3 of a
page so if page 2 finishes in that area it wont show footer....Regards
Bob



That's the problem I tried to explain before.

With the page footer taking up 1/3 of the page, you clearly
need its space on all but the last page. Unfortunately, no
matter what tricks I try, I can not get the page 1 of 1
scenario to work. Even though the page footer's Visible
property is True, it still doesn't display on the first
page.

I think it's time to give up on using the page footer. How
about using the report footer instead? Is it really
critical that the last page info be at the bottom of the
page?

--
Marsh
MVP [MS Access]





  #17  
Old September 20th, 2008, 03:02 AM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Footer only to appear once!

Bob Vance wrote:

OK got this figured now
(a)The code never shows the page footer on Page1 of 1 even if i just show
one record in the Sub/Report


Right, that's the conclusion I came to as well.


(b) shows the page footer when more than 1 page only IF there is enough room
on the page otherwise no page footer


I got around this one in my tests by using a funky trick,
but it still won't work on the first page so who cares.

This has turned into a seriously nasty problem, but I would
like to think about it some more. One restriction that
might(?) allow for a different set of tricks to have some
relevance is if your report section are always the same
size. Maybe there's a way to tell before the report is
formatted whether we need the more than one page or not.
Please post back to tell me all if the sections in the
report and if any of them must have CanGrow set to Yes.
--
Marsh
MVP [MS Access]


"Bob Vance" wrote.
Thanks Marshall you your effort and response, I actually made my footer
1/3 of the page so as after it is folded and posted the bottom part could
be cut off and posted back
If I made it smaller would it work?
Most of my clients don't push into page 2!
What if I create another report as well with a Report Footer then have a
code "if page one print this report!
Then I come to another problem as I have a batch print that prints off all
my Statements
I suppose in a perfect world , if only page 1 page footer if more than
page 1 report footer
Thanks............Bob
"Marshall Barton" wrote
Bob Vance wrote:

Marshall, Oops not quite working page 1 of 1 will not show footer, and
any
last page that the footer wont fit will not show , my footer is 1/3 of a
page so if page 2 finishes in that area it wont show footer....Regards
Bob


That's the problem I tried to explain before.

With the page footer taking up 1/3 of the page, you clearly
need its space on all but the last page. Unfortunately, no
matter what tricks I try, I can not get the page 1 of 1
scenario to work. Even though the page footer's Visible
property is True, it still doesn't display on the first
page.

I think it's time to give up on using the page footer. How
about using the report footer instead? Is it really
critical that the last page info be at the bottom of the
page?

  #18  
Old September 20th, 2008, 09:41 AM posted to microsoft.public.access.reports
Bob Vance
external usenet poster
 
Posts: 726
Default Footer only to appear once!

Marshall, Detail can grow yes
Sub report can grow No.
Thanks Bob
"Marshall Barton" wrote in message
...
Bob Vance wrote:

OK got this figured now
(a)The code never shows the page footer on Page1 of 1 even if i just show
one record in the Sub/Report


Right, that's the conclusion I came to as well.


(b) shows the page footer when more than 1 page only IF there is enough
room
on the page otherwise no page footer


I got around this one in my tests by using a funky trick,
but it still won't work on the first page so who cares.

This has turned into a seriously nasty problem, but I would
like to think about it some more. One restriction that
might(?) allow for a different set of tricks to have some
relevance is if your report section are always the same
size. Maybe there's a way to tell before the report is
formatted whether we need the more than one page or not.
Please post back to tell me all if the sections in the
report and if any of them must have CanGrow set to Yes.
--
Marsh
MVP [MS Access]


"Bob Vance" wrote.
Thanks Marshall you your effort and response, I actually made my footer
1/3 of the page so as after it is folded and posted the bottom part
could
be cut off and posted back
If I made it smaller would it work?
Most of my clients don't push into page 2!
What if I create another report as well with a Report Footer then have a
code "if page one print this report!
Then I come to another problem as I have a batch print that prints off
all
my Statements
I suppose in a perfect world , if only page 1 page footer if more than
page 1 report footer
Thanks............Bob
"Marshall Barton" wrote
Bob Vance wrote:

Marshall, Oops not quite working page 1 of 1 will not show footer, and
any
last page that the footer wont fit will not show , my footer is 1/3 of
a
page so if page 2 finishes in that area it wont show footer....Regards
Bob


That's the problem I tried to explain before.

With the page footer taking up 1/3 of the page, you clearly
need its space on all but the last page. Unfortunately, no
matter what tricks I try, I can not get the page 1 of 1
scenario to work. Even though the page footer's Visible
property is True, it still doesn't display on the first
page.

I think it's time to give up on using the page footer. How
about using the report footer instead? Is it really
critical that the last page info be at the bottom of the
page?



  #19  
Old September 21st, 2008, 01:12 AM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Footer only to appear once!

Bob Vance wrote:

Marshall, Detail can grow yes
Sub report can grow No.


Well shucks, that rules out several ideas I was
contemplating.

BUT, I finally stumbled over something that works in my
tests (using A2003). It's a little strange so pay attention
;-)

First, add a group (View menu - Sorting and Grouping) using
the expression =1. Specify Yes for the Group Footer.

Add a Page Break control (named pgEject) at the top of the
group footer section. (The Height of the group footer
section doesn't seem to matter!?)

Use the View menu to display the Report Footer section and
move everything you have in the page footer (the subreport?)
to the Report Footer section. Make the page footer
invisible or set its Height to 0.

Then put this code in the report's module. (Make sure you
remove any residual code from our earlier attempts.)

Const TPI As Long = 1440
Const PAPERHEIGHT As Long = 11 * TPI
Const BOTTOMMARGIN As Long = 0.5 * TPI

Private Sub GroupFooter1_Format(Cancel As Integer,
FormatCount As Integer)

Dim FooterTop As Long

FooterTop = PAPERHEIGHT - BOTTOMMARGIN _
- Me.Section(2).Height
If Me.Top = FooterTop Then
Me.pgEject.Visible = True
Else
Me.pgEject.Visible = False
Me.GroupFooter1.Height = FooterTop - Me.Top
End If
End Sub

Double check that the group footer's OnFormat property is
set to [Event Procedure]

Do not ask me to explain why this worked. I have no idea
what Access is doing when it executes the true part of the
If when FormatCount=1 and the Else part when FormatCount=2.

--
Marsh
MVP [MS Access]
  #20  
Old September 21st, 2008, 07:43 AM posted to microsoft.public.access.reports
Bob Vance
external usenet poster
 
Posts: 726
Default Footer only to appear once!

Marshall when I add a group it always goes to "=1 Header" is that correct
and where do I find yes for the group footer, remembering I am using 2007
Thanks Bob

"Marshall Barton" wrote in message
...
Bob Vance wrote:

Marshall, Detail can grow yes
Sub report can grow No.


Well shucks, that rules out several ideas I was
contemplating.

BUT, I finally stumbled over something that works in my
tests (using A2003). It's a little strange so pay attention
;-)

First, add a group (View menu - Sorting and Grouping) using
the expression =1. Specify Yes for the Group Footer.

Add a Page Break control (named pgEject) at the top of the
group footer section. (The Height of the group footer
section doesn't seem to matter!?)

Use the View menu to display the Report Footer section and
move everything you have in the page footer (the subreport?)
to the Report Footer section. Make the page footer
invisible or set its Height to 0.

Then put this code in the report's module. (Make sure you
remove any residual code from our earlier attempts.)

Const TPI As Long = 1440
Const PAPERHEIGHT As Long = 11 * TPI
Const BOTTOMMARGIN As Long = 0.5 * TPI

Private Sub GroupFooter1_Format(Cancel As Integer,
FormatCount As Integer)

Dim FooterTop As Long

FooterTop = PAPERHEIGHT - BOTTOMMARGIN _
- Me.Section(2).Height
If Me.Top = FooterTop Then
Me.pgEject.Visible = True
Else
Me.pgEject.Visible = False
Me.GroupFooter1.Height = FooterTop - Me.Top
End If
End Sub

Double check that the group footer's OnFormat property is
set to [Event Procedure]

Do not ask me to explain why this worked. I have no idea
what Access is doing when it executes the true part of the
If when FormatCount=1 and the Else part when FormatCount=2.

--
Marsh
MVP [MS Access]



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:01 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.