Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use Default Printer Function?

Status
Not open for further replies.

ribhead

Technical User
Jun 2, 2003
384
US
I'm trying to use the default printer function but I'm getting an arguement not optional alarm. What is it that I'm missing?

Private Sub cmdprint_Click()

Call My_Print

End Sub
Function My_Print(frmblankreport As Form) As Boolean

frmblankreport.UseDefaultPrinter = True
DoCmd.PrintOut
DoCmd.Close acForm, "frmblankreport"
DoCmd.OpenForm "frmmainmenu"

End Function

Thanks, Rib

Bartender:Hey aren't you that rope I threw out an hour ago?

Rope:No, I'm a frayed knot.
 
Call My_Print
vs
Function My_Print(frmblankreport As Form) As Boolean
When you call My_Print you have to supply a Form object as argument.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
[tt]Call My_Print(Me)[/tt]

VBSlammer
redinvader3walking.gif

[sleeping]Unemployed in Houston, Texas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top