|
-
Feb 5th, 2006, 08:11 AM
#1
Thread Starter
Junior Member
[RESOLVED] Printing in MS Access
Hi there,
I've got a database that requires some reports to be sent to different printers. As this database is to be run on a couple of different systems with quite different printers installed, I figured the best way to do this was to use the common dialog box to set the printer prior to the report being printed - The proper way to do it! However, I'm new to common dialog boxes and although I can handle the open/save modes with ease, I don't know where to start with the printer mode and currently, althought the correct box is coming up, the report is still printing to the printer that was selected from the menu when I designed it.
So I need to do the following:
1. Select the printer from those available on the system
2. Be able to set the number of copies
3. Be able to select the quality, paper source, etc. as usual
4. Disable the page selection (as the reports are preformatted as single pages)
5. Print the report using the above settings (Didn't need to say that I suppose!)
Here's my code so far:
VB Code:
Private Sub Print_profile_Click()
'On Error GoTo Exit_Print_profile_Click
Dim stDocName As String
'Save any changes made to the record prior to printing
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
'Printer options
CMDialog4.Action = 5
'WHAT DO I PUT HERE?
stDocName = "Client Profile"
DoCmd.OpenReport stDocName, acNormal
Exit_Print_profile_Click:
End Sub
Can anyone help please?
Last edited by OllieVB; Feb 5th, 2006 at 08:15 AM.
Ollie
Mess with the bull... You get the horns!
... Windows XP Home SP2
... Visual Basic 6 Professional Edition
... Office 2003 SP2 Professional Edition
I will always leave a good response to helpful postings... They are a lifeline! 
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
|