R
Richard
Hi,
Is it possible to print 2 copies of my report using the following code?
thanks.
*************************************************
Private Sub Command27_Click()
On Error GoTo Err_Command27_Click
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[WarehouseID] = " & Me.[WarehouseID]
DoCmd.OpenReport "rptWarehouse", acViewNormal, , strWhere
DoCmd.GoToRecord , , acNewRec
Driver.SetFocus
End If
Exit_Command27_Click:
Exit Sub
Err_Command27_Click:
MsgBox Err.Description
Resume Exit_Command27_Click
End Sub
Is it possible to print 2 copies of my report using the following code?
thanks.
*************************************************
Private Sub Command27_Click()
On Error GoTo Err_Command27_Click
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[WarehouseID] = " & Me.[WarehouseID]
DoCmd.OpenReport "rptWarehouse", acViewNormal, , strWhere
DoCmd.GoToRecord , , acNewRec
Driver.SetFocus
End If
Exit_Command27_Click:
Exit Sub
Err_Command27_Click:
MsgBox Err.Description
Resume Exit_Command27_Click
End Sub