Rainer2000
IS-IT--Management
I have several reports that differ only in the header. Is there any way to populate the report through a VB routine , thus making it one report?
Something Like:
Private Sub Befehl22_Click()
On Error GoTo Err_Befehl122_Click
Me.Recalc
Dim stDocName As String
'Dim Header As String
'Header = "Header for Transatlantic"
stDocName = "Openorders"
DoCmd.OpenReport stDocName, acPreview, , "[Ausblenden]=False AND [Shipped] ='Nein' AND [Bestellnummer-D]Not Like 0 AND [Anfragende Firma] Like'Transatlantic*'"
Exit_Befehl122_Click:
Exit Sub
Err_Befehl122_Click:
MsgBox Err.Description
Resume Exit_Befehl122_Click
End Sub
Rainer
Something Like:
Private Sub Befehl22_Click()
On Error GoTo Err_Befehl122_Click
Me.Recalc
Dim stDocName As String
'Dim Header As String
'Header = "Header for Transatlantic"
stDocName = "Openorders"
DoCmd.OpenReport stDocName, acPreview, , "[Ausblenden]=False AND [Shipped] ='Nein' AND [Bestellnummer-D]Not Like 0 AND [Anfragende Firma] Like'Transatlantic*'"
Exit_Befehl122_Click:
Exit Sub
Err_Befehl122_Click:
MsgBox Err.Description
Resume Exit_Befehl122_Click
End Sub
Rainer