Check if Report Footer exists via VBA

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
 
S

S.Clark

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
 

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

Top