Check if Report Footer exists via VBA

  • Thread starter Thread starter Shannon
  • Start date Start date
S

Shannon

I am looking for a way to check if there is a page footer on every report in
a database. I want to use VBA to cycle through all the reports and write
their name to a table, then mark if it has a footer or not. I am fine with
listing the reports but I don't know how to work out wheter or not they have
a footer.

Thanks

Shannon
 
If the Footer does NOT exist, then code like this would fail:
debug.print Me.PageFooter.Name

So, you could try this, and if you get an error, then it doesn't exist, and
you can react accordingly.

On error resume next
Error = 0
debug.print Me.PageFooter.Name
If err.number > 0 then
'Do this
else
'Do that
End if
 
Back
Top