My Assistant
![]() ![]() |
|
|
Mar 24 2008, 09:16 AM
Post
#1
|
|
|
New Member Posts: 8 |
Greetings All,
I have an report that I need to turn the footer off using code. I have tried all that I know, which is not much, but nothing works. Can anyone help? Thanks. wallen |
|
|
|
Mar 24 2008, 09:25 AM
Post
#2
|
|
|
UtterAccess VIP Posts: 18,396 From: Oklahoma City, Oklahoma |
Which footer (Group or page or report)?
You should be able to set the visible property to false |
|
|
|
Mar 24 2008, 09:27 AM
Post
#3
|
|
|
New Member Posts: 8 |
report footer
|
|
|
|
Mar 24 2008, 09:59 AM
Post
#4
|
|
|
UtterAccess VIP Posts: 18,396 From: Oklahoma City, Oklahoma |
You can use this to turn on/off the report footer:
CODE Me.ReportFooter.Visible = False
Depending on what will trigger the need to turn on or off the report footer, you could use something like the following This example uses the Report Footer's On Format event: CODE Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
' if there no records then hide the report footer If Me.HasData = True Then Me.ReportFooter.Visible = True Else Me.ReportFooter.Visible = False End If End Sub or Simplified to CODE Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
' if there no records then hide the report footer Me.ReportFooter.Visible = Me.HasData End Sub Hope this helps... |
|
|
|
Mar 24 2008, 10:10 AM
Post
#5
|
|
|
New Member Posts: 8 |
That works for visiblity, but what I need is to make it go away all together.
|
|
|
|
Mar 25 2008, 10:33 AM
Post
#6
|
|
|
UtterAccess VIP Posts: 18,396 From: Oklahoma City, Oklahoma |
Are you wanting change the report's design by deleting all the controls on the report footer with code?
|
|
|
|
Mar 25 2008, 10:46 AM
Post
#7
|
|
|
New Member Posts: 8 |
Yes. That is what I seek! Sorry but I did not know how to word it.
Any help would be highly valued! O |
|
|
|
Mar 26 2008, 03:38 PM
Post
#8
|
|
|
UtterAccess VIP Posts: 18,396 From: Oklahoma City, Oklahoma |
You will have to use VBA code to open the report in design mode and then delete the objects.
This is not something I would ever do since I use an MDE as the front end. SInce you can not open reports in design mode in an MDE, I have never tried to do anything like want you wnat to do. Is there some reason that you can not do this manually and have to use VBA code? |
|
|
|
Mar 27 2008, 06:37 AM
Post
#9
|
|
|
New Member Posts: 8 |
Yes, I have a database, that a user imports a report and its corresponding table. Once in the database, I have written code that will create a query def based on one record in the table and then open the report (filtered for that one record of course) and then print to the pdf printer. Thereby creating separate PDF's from a report that originally had 500 records in 1 report. We then post these to our intranet. the users understand what their part is in all of this and can handle the importing part. However, some of the reports that are imported have the report footer and controls in them. The footers are not wanted in the indiviual reports that are converted. The users level of understanding of Access ends with importing. They will never get the hang of deleting the controls and turning off the footer before running the code. Thererfore I am looking for a way to automate the process.
Thanks Bill |
|
|
|
Mar 27 2008, 06:50 AM
Post
#10
|
|
|
New Member Posts: 8 |
Well now this has truned out to be a moot point as I have learned that now it does not matter whether the footer shows or not.
Thanks for your input. I was very helpful O |
|
|
|
Mar 28 2008, 11:57 AM
Post
#11
|
|
|
UtterAccess VIP Posts: 18,396 From: Oklahoma City, Oklahoma |
Bill,
You're welcome. Glad we could assist. (IMG:http://www.utteraccess.com/forum/style_emoticons/default/uarulez2.gif) |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 21st May 2013 - 07:55 AM |