UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
2 Pages V  1 2 >  (Go to first unread post)
   Reply to this topicStart new topic
> Hiding Something On A Report, Access 2016    
 
   
payfast8898
post Jan 16 2020, 12:44 AM
Post#1



Posts: 388
Joined: 23-April 15
From: NY


Basically
CODE
iif([page]<>[pages])
i want to hide a page footer object.
I used to use a text box with WP BoxDrawing font and format ;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ and change the font to White and if
CODE
iif([page]<>[pages],true)
then it would turn the text box white or what ever color i changed the font to. if i created the db in access 2016 or higher it don't work anymore. if i converted one to that version it still works.

Does anyone know a solution or fix i can use. it seemed like there was another font that did the same but i can't find it anywhere. if anyone knows code i can use to do the same thing i would appreciate it also.

thanks.

--------------------
"When a collection of Brilliant minds, hearts and talents come together...
Expect a masterpiece"
Go to the top of the page
 
BruceM
post Jan 16 2020, 08:47 AM
Post#2


UtterAccess VIP
Posts: 8,026
Joined: 24-May 10
From: Downeast Maine


If you are trying to have the text box show up on the last page of the report only, have you tried placing it in the report footer rather than the page footer?

If it is something else, could you clarify exactly what you are trying to do?
Go to the top of the page
 
projecttoday
post Jan 16 2020, 09:03 AM
Post#3


UtterAccess VIP
Posts: 11,592
Joined: 10-February 04
From: South Charleston, WV


My suggestion is to set the textbox's visible property to false if you don't want it to be seen but it seems very strange that it would work in 2013 or 2010 but not in 2016. Exactly what is happening in 2016?

--------------------
Robert Crouser
Go to the top of the page
 
GroverParkGeorge
post Jan 16 2020, 09:43 AM
Post#4


UA Admin
Posts: 36,755
Joined: 20-June 02
From: Newcastle, WA


Unfortunately, there is at least one confirmed bug in Access following this Tuesday's Microsoft Updates. I'm afraid our first impulse these days is to look at such update related bugs. I think it won't hurt to pass this one along too.

Can we confirm what happens, though, in 2016 instead of what was happening?

--------------------
My Real Name Is George. Grover Park Consulting is where I did business for 20 years.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
payfast8898
post Jan 16 2020, 10:32 AM
Post#5



Posts: 388
Joined: 23-April 15
From: NY


I only have 2016 and 365 on my pc's so i don't know about 10 or 13. i do know if i covert a 2000 to 2003 or mdb to a accdb it still works.
I uploaded 3 images image one shows what i get now, image 2 is how the boxes are supposed to look, what i used instead of conditional formatting back in the day the issue is in the conditional formatting we have now i can't use transparent back ground where i can with this format. This also works good with this situation on the reports where i don't know how to have the same results using a different method.
Attached File(s)
Attached File  Image1.JPG ( 80.12K )Number of downloads: 2
Attached File  Image2.JPG ( 17.96K )Number of downloads: 0
Attached File  Image3.JPG ( 45.17K )Number of downloads: 1
 

--------------------
"When a collection of Brilliant minds, hearts and talents come together...
Expect a masterpiece"
Go to the top of the page
 
payfast8898
post Jan 16 2020, 10:38 AM
Post#6



Posts: 388
Joined: 23-April 15
From: NY


BruceM that is my last resort if it don't work out. my client didn't like it there when they send invoices when there is only had a couple lines because it would be half way up the page and not look as professional. i agree it looks a lot better down at the bottom

--------------------
"When a collection of Brilliant minds, hearts and talents come together...
Expect a masterpiece"
Go to the top of the page
 
projecttoday
post Jan 16 2020, 12:06 PM
Post#7


UtterAccess VIP
Posts: 11,592
Joined: 10-February 04
From: South Charleston, WV


This is only ever supposed to appear at the bottom of the last page of the report?

Seems to me there are 2 approaches: put it in the report footer and pad out the lines to get it to the bottom of the page or put it in the page footer and make it not visible until the last page.

Choice 2 shouldn't be too difficult.

--------------------
Robert Crouser
Go to the top of the page
 
payfast8898
post Jan 16 2020, 12:18 PM
Post#8



Posts: 388
Joined: 23-April 15
From: NY


Reports!Report1.PageFooter = 1 The page footer isn't printed on the same page as the report header. but if it is a one page invoice how do i get it to show or how do i make the page footer to only be available on last page?

--------------------
"When a collection of Brilliant minds, hearts and talents come together...
Expect a masterpiece"
Go to the top of the page
 
projecttoday
post Jan 16 2020, 12:23 PM
Post#9


UtterAccess VIP
Posts: 11,592
Joined: 10-February 04
From: South Charleston, WV


What? In design view, it's set visible = false. In the on format event of the page footer test for [Pageno] = [Pages] and if so visible = true.

--------------------
Robert Crouser
Go to the top of the page
 
payfast8898
post Jan 16 2020, 04:31 PM
Post#10



Posts: 388
Joined: 23-April 15
From: NY


maybe you can elaborate on this because i can't get what you wrote to work.

--------------------
"When a collection of Brilliant minds, hearts and talents come together...
Expect a masterpiece"
Go to the top of the page
 
projecttoday
post Jan 16 2020, 06:32 PM
Post#11


UtterAccess VIP
Posts: 11,592
Joined: 10-February 04
From: South Charleston, WV


If this textbox is only supposed to be seen on the last page then make it not visible from the beginning. Right before the last page is to be printed, make it visible. So then when it prints, it's visible.

In design view this textbox has a visible property (on the format tab). Set this property to No. That way it doesn't appear on the report.

But you want it to appear on the last page. The last page is the page whose page number is the same as the total number of pages. In the on format event of the page footer, put an if statement that tests if it's the last page and if so, set the visible property to Yes. That code is something like
If [Pageno] = [Pages] Then Me.textbox.Visible = Yes. Untested.

--------------------
Robert Crouser
Go to the top of the page
 
payfast8898
post Jan 16 2020, 07:40 PM
Post#12



Posts: 388
Joined: 23-April 15
From: NY


works on screen view but when i export to pdf or print it don't work. Ive spent way too much time on it i will figure a work around thanks for your time i really appreciate it.

--------------------
"When a collection of Brilliant minds, hearts and talents come together...
Expect a masterpiece"
Go to the top of the page
 
projecttoday
post Jan 16 2020, 08:07 PM
Post#13


UtterAccess VIP
Posts: 11,592
Joined: 10-February 04
From: South Charleston, WV


You're welcome.

--------------------
Robert Crouser
Go to the top of the page
 
BruceM
post Jan 17 2020, 07:39 AM
Post#14


UtterAccess VIP
Posts: 8,026
Joined: 24-May 10
From: Downeast Maine


The IIf expression in the Control Source seems incomplete in that it does not account for the test (Page = Pages) being False. In any case, it is not clear what you are trying to do with that Control Source expression. As Robert pointed out, the Format event (that is, the Format event procedure rather than a property of the report) seems like the place to set the Visible property, or other properties that apply to just one page:

Me.TextBoxName.Visible = (Me.Page = Me.Pages)

Or:
CODE
If Me.Page = Me.Pages Then
    Me.TextBoxName.Visible = True
  Else
    Me.TextBoxName.Visible = False
End If


The longer version would be used for something such as Fore Color that is not a Yes/No property.
Go to the top of the page
 
payfast8898
post Jan 17 2020, 09:35 AM
Post#15



Posts: 388
Joined: 23-April 15
From: NY


I'm basically trying to white out a section until the last page in the page footer. i used to use a font driven block but not working with the newer ms accesses so was looking for an alternative.
By accident i put this code into the formfooter format and it works perfectly. when i put it into the reportfooter where the object was it was not working all the time. not sure why but this is working for me.


CODE
Private Sub FormFooter_Format(Cancel As Integer, FormatCount As Integer)
Me.Box141.Visible = IIf(Me.page = Me.Pages, False, True)
End Sub

--------------------
"When a collection of Brilliant minds, hearts and talents come together...
Expect a masterpiece"
Go to the top of the page
 
projecttoday
post Jan 17 2020, 12:52 PM
Post#16


UtterAccess VIP
Posts: 11,592
Joined: 10-February 04
From: South Charleston, WV


That's the same thing.

By accident?

You don't really need to set it to false in the code if you set it to false in the design. I wonder if you could just put =(Me.page = Me.Pages) in the properties and eliminate the code.

--------------------
Robert Crouser
Go to the top of the page
 
theDBguy
post Jan 17 2020, 01:12 PM
Post#17


UA Moderator
Posts: 77,494
Joined: 19-June 07
From: SunnySandyEggo


Hi. Pardon me for jumping in... Could you please try out the attached demo and let me know if this does what you want or not? Thanks.

PS. I have included the PDF result.

Attached File(s)
Attached File  ReportDemo.zip ( 22.48K )Number of downloads: 3
Attached File  Report1.pdf ( 365.16K )Number of downloads: 2
 

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
BruceM
post Jan 17 2020, 02:20 PM
Post#18


UtterAccess VIP
Posts: 8,026
Joined: 24-May 10
From: Downeast Maine


Are you printing a form? You are describing the Form Footer event in a question in the Reports forum. Then you wrote about the report footer in the same posting where you showed the Form Footer code. Can you clarify?

Your solution is pretty much what people have been suggesting. I use If...Then blocks rather than IIf statements in VBA code, but IIf will get the job done.
Go to the top of the page
 
payfast8898
post Jan 18 2020, 12:39 AM
Post#19



Posts: 388
Joined: 23-April 15
From: NY


Bruce i'm in a report called invoice and then i click and highlight the Report footer then go over to properties and go into On Format and it says formfooter as the image down below says?
Attached File(s)
Attached File  formfooter.JPG ( 71.45K )Number of downloads: 3
 

--------------------
"When a collection of Brilliant minds, hearts and talents come together...
Expect a masterpiece"
Go to the top of the page
 
payfast8898
post Jan 18 2020, 12:52 AM
Post#20



Posts: 388
Joined: 23-April 15
From: NY


Hey dbguy i have been using that with no problems the issue i have is i have a whole section down there with boxes lines fields etc for my 30 60 90 120 and i have it in a bunch of different reports and programs and didn't want to have to write code for all of them to hid so i have use a block for 15 years and worked great until i started using the 365. i can make my white block work from the report footer for the page footer on format. it kind of works from the page footer until i exported it to a pdf and it didn't hide it so by accident i put it in the report footer and it worked so that is what is working for me right now. thanks for your time always appreciated

--------------------
"When a collection of Brilliant minds, hearts and talents come together...
Expect a masterpiece"
Go to the top of the page
 
2 Pages V  1 2 >


Custom Search


RSSSearch   Top   Lo-Fi    19th February 2020 - 09:19 AM