View Single Post
  #3  
Old May 19th, 2010, 04:23 AM posted to microsoft.public.access.reports
Duane Hookom[_4_]
external usenet poster
 
Posts: 316
Default Report not executing code

The code should be in the On Format event of the report section containing
the controls.

--
Duane Hookom
MS Access MVP


"mr3316a via AccessMonster.com" u59438@uwe wrote in message
news:a8348634aa541@uwe...
I am running Access 2007, and have the following problem.
In my report's load event, a have the following code:

If Me.Controls("txtProofReq").Value = "NO" Then
Me.Controls("lblProof").Visible = False
Me.Controls("txtProofDate").Visible = False
Me.Controls("txtProofTime").Visible = False
Else
Me.Controls("lblProof").Visible = True
Me.Controls("txtProofDate").Visible = True
Me.Controls("txtProofTime").Visible = True
End If

Its purpose is to make some controls visible or not based on the data
being
presented.
When I print preview the report, it works as expected.
However, when I send the report directly to the printer without being
opened
it doesn't work.

Does anyone have any suggestions on how to make it work?

Thanks in advance
Mark

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