Page 1 of 3 123 LastLast
Results 1 to 15 of 38
  1. #1
    data808 is offline Noob
    Windows XP Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    727

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

    Does anyone know why I get this message if I click on the setup button in the print window?

    When I click on my print button then click on setup in the print window, it always has an error message:
    This action can't be carried otu while processing a form or report event



    Does anyone know why?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,951
    I cannot replicate the issue. If you want to provide db ...
    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 7 32bit Access 2007
    Join Date
    Aug 2012
    Posts
    727
    Would the VBA code of that form be ok?

    If not, how do I send the db to you?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,951
    Are you trying to print a report? If the code simply opens report, print setup should be available. Post code if you want. To provide db, follow instructions at bottom of my post.
    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.

  5. #5
    data808 is offline Noob
    Windows 7 32bit Access 2007
    Join Date
    Aug 2012
    Posts
    727
    Yes I am trying to print a report. The print button is on the report header. Everything works great. Even the print is working great. Its just the setup option on the print window that doesn't seem to work. Here is all the code for the report:

    Private Sub cmdCloseReport_Click()

    DoCmd.Close
    DoCmd.OpenForm "DL_Clearance_Query", acNormal, , , acFormAdd

    End Sub

    Private Sub cmdPrint_Click()

    On Error Resume Next
    DoCmd.RunCommand acCmdPrint

    End Sub

    Private Sub Report_KeyDown(KeyCode As Integer, Shift As Integer)

    'to activate statements below, set Key Preview property to "yes" for each form.
    'then paste this code to each form in the "On Key Down" event.

    If KeyCode = vbKeyF1 Then
    KeyCode = 0
    End If

    If KeyCode = vbKeyF2 Then
    KeyCode = 0
    End If

    If KeyCode = vbKeyF3 Then
    KeyCode = 0
    End If

    If KeyCode = vbKeyF4 Then
    KeyCode = 0
    End If

    If KeyCode = vbKeyF5 Then
    KeyCode = 0
    End If

    If KeyCode = vbKeyF6 Then
    KeyCode = 0
    End If

    If KeyCode = vbKeyF7 Then
    KeyCode = 0
    End If

    If KeyCode = vbKeyF8 Then
    KeyCode = 0
    End If

    If KeyCode = vbKeyF9 Then
    KeyCode = 0
    End If

    If KeyCode = vbKeyF10 Then
    KeyCode = 0
    End If

    If KeyCode = vbKeyF11 Then
    KeyCode = 0
    End If

    If KeyCode = vbKeyF12 Then
    KeyCode = 0
    End If

    If KeyCode = vbKeyPageUp Then
    KeyCode = 0
    End If

    If KeyCode = vbKeyPageDown Then
    KeyCode = 0
    End If

    If KeyCode = vbKeyMenu Then
    KeyCode = 0
    End If

    If KeyCode = vbKeyEnd Then
    KeyCode = 0
    End If

    If KeyCode = vbKeyHome Then
    KeyCode = 0
    End If

    '80=P, 83=S, 109=- on NumPad, 107=+ on NumPad, 187==/+ next to backspace, 189=-/_ next to =/+ key
    '65=A, 70=F, 71=G, 72=H, 74=J, 13=Enter, 90=Z, 186=;/:, 188=,/<
    If (Shift And acCtrlMask) And (KeyCode = 80 Or KeyCode = 83 Or KeyCode = 109 _
    Or KeyCode = 107 Or KeyCode = 187 Or KeyCode = 189 Or KeyCode = 65 Or KeyCode = 70 _
    Or KeyCode = 71 Or KeyCode = 72 Or KeyCode = 74 Or KeyCode = 13 Or KeyCode = 90 _
    Or KeyCode = 186 Or KeyCode = 188) Then
    KeyCode = 0
    End If

    If (Shift And acAltMask) > 0 Then
    KeyCode = 0
    Shift = 0
    End If

    End Sub

  6. #6
    trevor40's Avatar
    trevor40 is offline Advanced db Manager
    Windows XP Access 2003
    Join Date
    Feb 2014
    Location
    Australia
    Posts
    402
    As I said in a different post
    On Error Resume Next
    May cause problems if it's not a very basic report, remove this line to see if an error code is returned and let us know what that is, it may help.
    Anyway without any other details it could have something to do with the mode you open the report in, modal, dialog, I don't remember from your other posts

    It's hard to keep up with all of your posts about the same issues, please keep them together if you can.



  7. #7
    data808 is offline Noob
    Windows 7 32bit Access 2007
    Join Date
    Aug 2012
    Posts
    727
    The On Error Resume Next was for when the user cancels the print for this same form which was fixed. This error I am working on now was there before and still remains after I added the On Error Resume Next line. This error has not changed. I am in modal for all forms and reports to prevent the user from getting access to the ribbon. Anyway, sorry for posting so much about the same issues.

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,951
    I don't even see code that opens report.

    Don't see anything in posted code to cause issue.
    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.

  9. #9
    trevor40's Avatar
    trevor40 is offline Advanced db Manager
    Windows XP Access 2003
    Join Date
    Feb 2014
    Location
    Australia
    Posts
    402
    Take out the on error line and tell us what error number is being reported it may be relevant.

    set the forms and reports to normal NOT modal and test it. let us know the results.

    Back at 5pm tomorrow AU time

    PS I think He's using this to open the report DoCmd.RunCommand acCmdPrint

    PPS If you have any other problems in other parts of the report later, stay in the same thread. This helps see all related information that may help you out.

  10. #10
    data808 is offline Noob
    Windows 7 32bit Access 2007
    Join Date
    Aug 2012
    Posts
    727
    Ok well the open report would be on my split form. I'll get that to you. But fyi, the error is happening ON the report when I click the setup button in the print window.

    That is the error I got before and after the error line of code you suggested. Not sure if its even an error because it did not have an error code like the cancel print problem I was having. The error line took care of that. As for the print setup problem, I guess I should just call it a prompt that comes up saying:

    This action cannot be carried out while processing a form or report event.

    Then it lists some things about a macro that could be causing it. I'll get the full message to you guys soon.

  11. #11
    data808 is offline Noob
    Windows 7 32bit Access 2007
    Join Date
    Aug 2012
    Posts
    727
    I just tested it on a brand new blank database and I still get that pop up message. So the VBA or macros, have nothing to do with it. Its weird you guys can't replicate the problem. I just did it in access 2007. I made a table with a couple fields and left them with no entry. Then went to make a blank form with a print button using the control wizard and one print button using VBA and they both get the same message for when I click setup. This is ridiculous.

  12. #12
    data808 is offline Noob
    Windows 7 32bit Access 2007
    Join Date
    Aug 2012
    Posts
    727
    Here is the complete prompt:

    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.

    Thats the message in its entirety. Keep in mind I have replicated this problem with a blank form with a print button that was made from a macro with the control wizard and one using VBA. I also want to add that nothing happens when I click OK. No Action Failed dialog box or anything. This is ridiculous. Again this only happens with the setup button which is on the print window where I can also click properties for the printer, choose which printer I want, click OK, or the Cancel button. Does no one ever get this message? When I actually think about it, I don't think I ever got this setup feature to work on any of my other databases too, ever. Am I missing something here?

  13. #13
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,951
    If report is opened manually from the navigation pane is the Setup available?
    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.

  14. #14
    trevor40's Avatar
    trevor40 is offline Advanced db Manager
    Windows XP Access 2003
    Join Date
    Feb 2014
    Location
    Australia
    Posts
    402
    refer to my post # 9 IS THE FORM SET TO MODAL?

  15. #15
    data808 is offline Noob
    Windows 7 32bit Access 2007
    Join Date
    Aug 2012
    Posts
    727
    Refer to my latest post. I replicated this on a brand new blank form. Nothing was changed. I went straight ahead and made the print buttons. Did not touch any other properties.

Page 1 of 3 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 11-10-2013, 11:21 AM
  2. Triggering a form event from a report
    By Paul H in forum Forms
    Replies: 2
    Last Post: 10-12-2012, 09:48 AM
  3. Carried over totals
    By Alex Motilal in forum Reports
    Replies: 0
    Last Post: 10-06-2010, 08:28 AM
  4. Carried over totals
    By Alex Motilal in forum Reports
    Replies: 3
    Last Post: 01-29-2010, 11:13 AM
  5. New Database - Batch processing
    By stevo2820 in forum Database Design
    Replies: 0
    Last Post: 04-30-2007, 02:22 AM

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