View Single Post
  #8  
Old May 14th, 2010, 08:57 PM posted to microsoft.public.access.reports
1stAyd via AccessMonster.com
external usenet poster
 
Posts: 5
Default Conditionally Format A Line?

Thanks, Duane, but I'll still SOL. In "On Format" of Detail it now says
"Event Procedure", and I copied exactly what you have into the code window.
The code window now says:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.[Line18].[Visible] = (Me.[txtIPG] = "RESALE")
End Sub

I tried to print instead of previewing, and I got this message: "A custom
macro in this report has failed to run, and is preventing the report from
rendering". In case it makes a difference, I'm using Access 2007. Thanks.


Duane Hookom wrote:
You must be in the code/module/vba window, not in the properties dialog.
There should not be any "=", just:
Me.[Line18].[Visible]=([Me].[txtIPG]="RESALE")

Still no luck. I created txtIPG, with the control source as [Inventory
Posting Group], and have this in the "On Format" event of the detail section:

[quoted text clipped - 5 lines]
I tried that too, but didn't realize [Inventory Posting Group] had to be tied
to a report control.....


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ports/201005/1