Hiding controls on reports in Access

D

dusrtcat

I am trying to achieve the following on a report to change report headers to
certain values and hide or show certain controls, only with partial
success... see code

Any pointers



Option Compare Database
Dim Copies As Integer

Private Sub PageHeader0_Print(cancel As Integer, PrintCount As Integer)

Select Case Copies
Case 1
[texttype].Caption = "Delivery Note"
[Projamt].Visible = False
Case 2
[texttype].Caption = "Customer Copy"
[Projamt].Visible = False
Case 3
[texttype].Caption = "Office Copy"
[Projamt].Visible = True

End Select
If Page = Pages Then Copies = Copies + 1

End Sub



Private Sub Report_open(cancel As Integer)
Copies = 1
End Sub
 
S

strive4peace

try using the Format event instead of the Print event

Warm Regards,
Crystal
Microsoft Access MVP 2006

remote programming and training
strive4peace2006 at yahoo.com
*
Have an awesome day ;)
 

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