Buongiornio Forum,
tempo fa Alex mi aveva aiutato e portato a una soluzione per evitare la stampa dopo una interruzione di pagina in un report con il seguente codice:
codice:
Option Compare Database
Option Explicit
Private Sub Corpo_Format(Cancel As Integer, FormatCount As Integer)
If Me.Articoli_Qta > 0 Then 'Controllo del campo interessato
Me.Section("ppR").Visible = True
Else
Me.Section("ppR").Visible = False
End If
End Sub
Ora vorrei adattarlo a un'altro db con la differenza che il campo interessato presente in pagina 2 da 1 passa a 3, quindi 3 controlli.
Ho provato a editarlo ma ovviamente non riesco ad andare oltre a quello fatto, il debug mi evidenza la riga del controlo campo 1 dkcendo Neccessario Oggetto:
codice:
Option Compare Database
Option Explicit
Private Sub Corpo_Format(Cancel As Integer, FormatCount As Integer)
If Me.img01 Is Not Null Then 'Controllo campo 1
Me.Section("ppR").Visible = True
Else
Me.Section("ppR").Visible = False
End If
If Me.img02 Is Not Null Then 'Controllo campo 2
Me.Section("ppR").Visible = True
Else
Me.Section("ppR").Visible = False
End If
If Me.img03 Is Not Null Then 'Controllo campo 3
Me.Section("ppR").Visible = True
Else
Me.Section("ppR").Visible = False
End If
End Sub
Piero