Report.UseDefaultPrinter property (Access)

Returns or sets a Boolean indicating whether the specified report uses the default printer for the system; True if the form or report uses the default printer. Read/write.

Syntax

expression.UseDefaultPrinter

expression A variable that represents a Report object.

Remarks

This property is read/write in Design view and read-only in all other views.

When this property is True, the form or report inherits all its printer settings from the settings of the default printer. Changing the printer associated with a form or report by assigning its Printer property to a Printer object sets the UseDefaultPrinter property to False.

Example

The following example checks to see if the specified form is using the default printer; if not, the user is asked if it should.

Function CheckPrinter(frmTemp As Form) As Boolean 
 
 If frmTemp.UseDefaultPrinter = False Then 
 If MsgBox("Should this form use " _ 
 & "the default printer?", _ 
 vbYesNo) = vbYes Then 
 frmTemp.UseDefaultPrinter = True 
 End If 
 End If 
 
End Function

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.