Hello,
I am trying to have the same report preview 3 times, but each time it opens, I would like it to display diferent things. This gets trigered by a button click on a form. This is the code I have:
The problem I am getting is that it only opens once. It seems to format 3 times but I only see it once...
Thanks,
Sylvain
I am trying to have the same report preview 3 times, but each time it opens, I would like it to display diferent things. This gets trigered by a button click on a form. This is the code I have:
Code:
Private Sub cmdPrint_Click()
Dim i As Integer
For i = 1 To 3
DoCmd.OpenReport "zqreShipExtraClient", acViewPreview
If i = 1 Then
Reports![zqreShipExtraClient].Label129.Visible = True
Else
Reports![zqreShipExtraClient].Label129.Visible = False
If i = 2 Then
Reports![zqreShipExtraClient].Label130.Visible = True
Else
Reports![zqreShipExtraClient].Label130.Visible = False
If i = 3 Then
Reports![zqreShipExtraClient].Label131.Visible = True
Else
Reports![zqreShipExtraClient].Label131.Visible = False
End If
End If
End If
Next
End Sub
The problem I am getting is that it only opens once. It seems to format 3 times but I only see it once...
Thanks,
Sylvain