Access 2007 Report Format issues

  • Thread starter Thread starter Ed
  • Start date Start date
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
 
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
 
Back
Top