Problem with report_Page event

  • Thread starter Thread starter Linda Buytaert
  • Start date Start date
L

Linda Buytaert

Hello,

I'm having a serious problem with a report in Microsoft
Access 2000 and I can't seem to find the solution. I have
a report where the visibility of a certain text box should
change according to the value of the record. ALso the logo
has to change to the logo that belongs to the customer
that is displayed. I've written following code to do this:


Me.ImageLogo.Picture = Me.Figuurpad.Value
Me.ImageLogo.Height = Me.Hoogte.Value * 567
Me.ImageLogo.Width = Me.Breedte.Value * 567
Me.txtVerzend_Klant.Visible = False
Me.txtVerzend_Adresje.Visible = False
Me.txtVerzend_Gem.Visible = False
Me.txtGewoneKlant.Visible = False
Me.txtGewoonAdresje.Visible = False
Me.txtGewoneGemeente.Visible = False
If (Me.txtVerzend_Klant) = " " Then
Me.txtGewoneKlant.Visible = True
Me.txtGewoonAdresje.Visible = True
Me.txtGewoneGemeente.Visible = True
Else
Me.txtVerzend_Klant.Visible = True
Me.txtVerzend_Adresje.Visible = True
Me.txtVerzend_Gem.Visible = True
End If

I've put it in the report_page event, and in the
report_acitvate event, but the problem is that it is not
always exececuted. Sometimes, it works well for 100 pages
and then the next one is wrong. Can someone give me more
information on which event I should use this code in, in
order to make sure that the code is executed for every
single page in the report??

Thanks a lot!
Linda Buytaert
 
The code needs to go into the Format event of the section that contains
these objects. That's the only way to guarantee that you are referring to
the correct values.
 
Back
Top