|
-
December 3rd, 1999, 04:38 PM
#1
printer
on a button i need to be able to choose witch printer i need to print on. i have no idea the way to do it.
thank you in advanced
-
December 7th, 1999, 10:16 PM
#2
Re: printer
First, include the visual basic common dialog controls in your application (by pressing Ctrl-T). Place the common dialog control in your form. Now, include this code in your button's Command1_click() command.
Sub Command1_Click()
Commondialog1.ShowPrinter 'This brings up the print dialog box
'which will give you a selection of printers
'in your system.
End Sub
Hope that this helps...
Cheers...
-
December 8th, 1999, 10:02 AM
#3
-
December 10th, 1999, 09:10 AM
#4
Re: printer
Also you can select a printer programatically from your VB application. Check follow sample:
http://vbcode.webhostme.com/en/click.asp?id=80
[email protected]
http://vbcode.webhostme.com/
-
December 10th, 1999, 11:15 AM
#5
Re: printer
thank you for you're help
but it doesn't work on a click button but i'm keeping the code for futur use and the adress
nath
-
December 23rd, 1999, 09:07 AM
#6
Re: printer
I wanted to thank you for the help andi found the code that worked for me so here it is if you ever need it
Private Sub ImageImprimante_Click()
On Error GoTo Err_ImageImprimante_Click
DoCmd.DoMenuItem acFormBar, acrecordmenu, acSaveRecord, , acMenuVer70
Dim stDocName As String, Critere As Variant
Critere = Me![No_Appel]
stDocName = "E_NoAppel"
DoCmd.OpenReport stDocName, acViewPreview, [No_Appel], "[No_Appel] = " & Critere
'This is the line that opens the file menu printer
' to be able to choose the printer
DoCmd.DoMenuItem acFormBar, acFile, 6
Exit_ImageImprimante_Click:
Exit Sub
Err_ImageImprimante_Click:
MsgBox Err.Description
Resume Exit_ImageImprimante_Click
End Sub
And Happy holydays
nath 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|