Hello ,
I have a db that has a form and when I choose the View or Print Option and then I click on the PrintButton.
It will print out my report, but I want this report to Print or be viewd in Landscape.....
This is the code I have in my form to print the report..
*******************************************
Private Sub PrintButton_Click()
Dim WClause
Const RName = "rptTrackAgent"
WClause = "[Date] Between #" & _
Me![Start] & "# AND #" & _
Me![End] & "# AND [Agent] = '" & _
Me![Agent] & "'"
If DCount("*", "qryAgentTracking", WClause) Then
DoCmd.OpenReport _
Reportname:=RName, _
WhereCondition:=WClause, _
View:=Me![OutputTo], _
Orientation:=acPRORLandscape
Else
MsgBox "No Matching Records"
End If
End Sub
But My program bugs everytime at the Orientation:=acPRORLandscape
Does anyone one know how to do this in VB Code...
I have a db that has a form and when I choose the View or Print Option and then I click on the PrintButton.
It will print out my report, but I want this report to Print or be viewd in Landscape.....
This is the code I have in my form to print the report..
*******************************************
Private Sub PrintButton_Click()
Dim WClause
Const RName = "rptTrackAgent"
WClause = "[Date] Between #" & _
Me![Start] & "# AND #" & _
Me![End] & "# AND [Agent] = '" & _
Me![Agent] & "'"
If DCount("*", "qryAgentTracking", WClause) Then
DoCmd.OpenReport _
Reportname:=RName, _
WhereCondition:=WClause, _
View:=Me![OutputTo], _
Orientation:=acPRORLandscape
Else
MsgBox "No Matching Records"
End If
End Sub
But My program bugs everytime at the Orientation:=acPRORLandscape
Does anyone one know how to do this in VB Code...