Results 1 to 11 of 11
  1. #1
    data808 is offline Noob
    Windows 8 Access 2007
    Join Date
    Aug 2012
    Posts
    727

    Printing report setup button not working


    I get an error message when I click the setup button in the print dialog window. Does anyone know how to fix this?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    What is the exact error message?
    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
    data808 is offline Noob
    Windows 8 Access 2007
    Join Date
    Aug 2012
    Posts
    727
    Either that or does anyone know vba code to give user some options when printing? Like portrait or landscape, print which pages, fit on one page, select which printer, etc... It would be nice for the user to have these options to change when printing a report.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,849
    Can you tell us the error message text or post a screen capture?

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    I had code that would automatically set duplexing depending on user default printer. However, it quit working when we upgraded to Windows 7 and Office 2010. So annoying.

    I also have code to set the destination paper bin. That still works. https://www.accessforums.net/program...ode-27054.html

    Bing: Access VBA printer object properties
    http://www.everythingaccess.com/tuto...ection-Utility
    http://programmersheaven.com/discuss...ter-properties
    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.

  6. #6
    data808 is offline Noob
    Windows 8 Access 2007
    Join Date
    Aug 2012
    Posts
    727
    Here is the message I get:

    "This action can't be carried out while processing a form or report event.

    A macro specified as the OnOpen, OnLoad, OnClose, OnFormat, OnRetreat, OnPage, or OnPrint property setting contains an invalid action for the property.

    When you click OK, an Action Failed dialog box will display the name of the macro that failed and its arguments."


    After I click OK, nothing happens. There is no Action Failed dialog box that pops up. I do not have any macros running that I am aware of either. I tried to do everything in VBA. The VBA command that I have behind the print button is:

    On Error Resume Next
    Docmd.Runcommand acCmdPrint

    After clicking the print button that I created on the report, the print dialog window appears and this is where the setup button is that doesn't work. The report is in modal mode with the split form behind it. I have a close button that will close the report so the user can go back to the split form which is not in modal. I only have the report in modal so the user has to either print or close it in order to go back to other parts of the database. I don't want lingering report windows scattered. It may confuse the user. So I'm not sure if this is what's causing the error but I really need to get this figured out because I have posted about this problem a long time ago but was not able to find a solution.

    I should also mention that no matter what I do, I was NEVER able to get the setup button to work in the print dialog window. I've tried many things. I even tried creating a database from scratch just to test the print setup button and I would still get the same error message. So there must be something I am doing wrong because I'm sure the print setup is supposed to work and this is not just a bug. It's been happening to me since I been using 2007 Office all through 2013. Please help me figure this problem out. It's driving me crazy.

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Now that you mention it, this does sound familiar. Is this the other thread https://www.accessforums.net/forms/a...orm-42195.html
    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.

  8. #8
    data808 is offline Noob
    Windows 8 Access 2007
    Join Date
    Aug 2012
    Posts
    727
    Yes that is the thread. How do you find old threads like that?

    I just went through the whole thing and tried out what Trevor40 posted with the sample db in .mdb format and it works. However, what I am so sad about is the fact that it does not have the option to fit to one page option. That was the main reason I wanted to have the page setup work. I need to occasionally have my reports or whatever I print in Access to fit to a single page. Do you know how to get that option? sometimes it prints on a second page and only uses a fraction of the page so its wasting paper.

    Thanks for the help June7. I hope you never leave this forum. You and the other gurus have always been most helpful.

  9. #9
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    I just searched the forum for threads you started.

    Why would the report stretch to a second page - more records or margins too narrow?

    Access does not have 'fit to page'. Have to format and arrange elements so all fit on one page. If the report is to output multiple records and the number of records varies, the report length will vary.
    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.

  10. #10
    data808 is offline Noob
    Windows 8 Access 2007
    Join Date
    Aug 2012
    Posts
    727
    Yes I do like the margins narrow because I want to utilize the space and much as possible. So what you are saying is that the only way is to trial and error on sizing the report in design view till I get it to fit to one page? Oh and when I said fit to one page, I mean horizontal. I understand that vertical will vary since my reports have different amounts of records all the time. So going down the page is fine. It's across that sometimes its to long and gets cut off and the rest goes onto a second page. This is what's annoying me.

  11. #11
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Yes. Try larger margin.
    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. Replies: 1
    Last Post: 05-25-2013, 11:19 AM
  2. Setup a field to Total Weight in My Report
    By Triland in forum Access
    Replies: 2
    Last Post: 01-25-2013, 02:11 PM
  3. Replies: 4
    Last Post: 05-17-2012, 12:28 AM
  4. Replies: 2
    Last Post: 01-11-2012, 06:06 PM
  5. Report Page Setup
    By DaniC818 in forum Reports
    Replies: 1
    Last Post: 03-30-2009, 07:33 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