Results 1 to 4 of 4
  1. #1
    Mgomp is offline Novice
    Windows Vista Access 2010 (version 14.0)
    Join Date
    Dec 2010
    Posts
    8

    Manually control paper size and - bin in reports

    Hi all.



    On Microsft Support pages I found an interesting article;
    "Changing printer settings for a report in Access"
    http://office.microsoft.com/en-us/ac...553.aspx?CTT=1

    But, when reading this article, I see that the code for filling the recordsource for the Combobox "PaperSize" (aviable papersizes for each printer?) are missing. (I think the proper .additem - code is missing).

    Further more, I would realy like to be able to selct which paper bin should be used for each report. (selcted from aviable bins for the selected printer).

    I know this may be to much to ask for, but could someone please help me with the "missing" code?

    Regards,

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Maybe the article leaves it up to you how you want to setup the paper size combobox RowSource. Could be built as a ValueList or by query to a table or with code using the .AddItem method.

    I suggest making the paper size box dependent on selection in printer box. Set it as disabled then in printer box AfterUpdate enable the paper size box and populate the RowSource. Check this article for getting the paper size and bin locations for printer http://msdn.microsoft.com/en-us/libr...ffice.12).aspx

    Here is how I set printer bin destination (only to user's default printer):
    strPrinter = Application.Printer.DeviceName
    'open report in preview mode because is only way to change bin and/or printer destinations without changing report saved setup
    DoCmd.OpenReport strReport, acViewPreview, , "Submit.LabNum='" & strLabNum & "'", acWindowNormal
    If strPrinter Like "*Konica*" Then Reports(strReport).Printer.Duplex = acPRDPSimplex
    Reports(strReport).Printer.PaperBin = acPRBNLower
    DoCmd.PrintOut
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Mgomp is offline Novice
    Windows Vista Access 2010 (version 14.0)
    Join Date
    Dec 2010
    Posts
    8
    Thanks for the replay.

    As you wrote, (and I wrote), I is all about finding a easy way to fill a combobox with avaiable papersize and paper bin for the selected printer. I follow the code so far.

    But I thought using the .additem would be much more easy than the link you shared.

    The whole idea is to fire off a litle popup, just the same if I right-click on report preview, select page setup and selct page. From this point I can select a printer, and then I will be given a combobox with a list of installed paperbin for the selected printer.
    If posilble - I would like to do this from the small form - like the form in the link I was referring to.

    Why? Some of my report are using different type of labels, and some of the user of the FE have different type of printer installed (office are located on different places..)

    So, is it posible to use a code like; (On a AfterUpdate on a cboListOfPrinters)
    For Each paperbin_installed In Me!cboListOfPrinters
    Me!cboListOfPaperBin.Additem paperbin_installed.Name
    Next

    If this is possible, the problem for me is to prepeare the paperbin_installed variable with: Dim paperbin_installed As ?????

    Regards,

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    The link I provided gives code for getting properties of printers. The printer's available bins are just one of the properties. How you apply the code is subject to your circumstances. I have not done what you propose so can only suggest you try it and debug. It is possible this might not be necessary. There are some VBA constants for bin location and other properties as shown in my code (acPRBNLower, acPRDPSimplex) that might apply regardless of printer. We have several printers users can set as default. Only the Konicas can duplex and have two print trays hence my code to detect Konica.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Paper size problem
    By Jack Sheet in forum Reports
    Replies: 4
    Last Post: 07-15-2011, 12:12 PM
  2. Font Size control
    By techexpressinc in forum Forms
    Replies: 2
    Last Post: 06-29-2011, 06:26 AM
  3. How to size form and keep control box
    By mhh12 in forum Forms
    Replies: 3
    Last Post: 06-25-2011, 11:10 AM
  4. is there a Size Limit to reports???
    By ghodges in forum Reports
    Replies: 5
    Last Post: 08-17-2010, 07:16 AM
  5. Replies: 0
    Last Post: 03-06-2010, 01:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums