Click to See Complete Forum and Search --> : printing a form


Narmada Gosula
June 18th, 2001, 07:02 AM
hello sir...
i want to place a command button on the form which will print that page.....i tried it ..using common dialog box......what i need is it has to ask for type of printer and no. of pages and the size of the page and all other printer options...
what will be the code shall i write on onclick() event of command button.
thank u in advance....

Shmulik Golan
June 18th, 2001, 09:27 AM
hi.
sorry, i didn't understand what do you want to do exactly. if you want to print the form as is you can us MyForm.PrintForm

if not, you can us the printer collection in order to set the printer you want to print to.

hope i helped you. if not, just asked again - more specific what you are looking for.

Smile, Shmulik. (-;

Ghost308
June 18th, 2001, 09:34 AM
Try some of this...

Command1_click()

Command1.visible = false 'you don't want to print the print button do you?
CommonDialog1.ShowPrint 'you might wanna check my syntax there to be sure, i don't typically use this
MyForm.PrintForm 'print the form
Command1.visible = true 'show me the button!

End Sub