Access 2007 Report Format issues

E

Ed

I just converted a 2003 program to 2007. I use a macro in the "On Format"
command in the detail section of the report to set certain fields to visable
"yes" or "No" based on the data. The Macro uses the Setvalue command. The
Database is Trusted. The macro worked fine in 2003 but when I try to print
or do a print preview in 2007 I get the following error. "A custom Macro in
this report has failed to run, and is preventing the report from rendering."

Is this a Bug in 2007? Is there another way to get the formatting done in VB?

Thanks,

Ed
 
D

Duane Hookom

You could try some code in the On Format event (in the module) like:

Dim booMyCondition as Boolean
'substitute your condition below
booMyCondition = (Me.txtWhatever <= Me.txtOther)
Me.txtFieldA.Visible = booMyCondition
Me.txtFieldB.Visible = booMyCondition
 

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