Results 1 to 4 of 4

Thread: [RESOLVED] Printing in MS Access

Threaded View

  1. #1

    Thread Starter
    Junior Member OllieVB's Avatar
    Join Date
    Jan 2006
    Location
    England, UK
    Posts
    24

    Resolved [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:
    1. Private Sub Print_profile_Click()
    2. 'On Error GoTo Exit_Print_profile_Click
    3.    
    4.     Dim stDocName As String
    5.    
    6.     'Save any changes made to the record prior to printing
    7.     DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
    8.    
    9.     'Printer options
    10.     CMDialog4.Action = 5
    11.    
    12.     'WHAT DO I PUT HERE?
    13.    
    14.     stDocName = "Client Profile"
    15.     DoCmd.OpenReport stDocName, acNormal
    16.  
    17. Exit_Print_profile_Click:
    18. 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
  •  



Click Here to Expand Forum to Full Width