PasteAppend - Clipboard not responding

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bwesenberg
    New Member
    • Jan 2007
    • 17

    PasteAppend - Clipboard not responding

    I have created an Access Front End Database that many people in one of the departments use. Each user has their own copy of the Front End on their Computer. The Back End is on a SQL Server.

    On one of the forms I created a Duplicate Record Button using the Wizard in Access. I have ONE user who has trouble using this button.

    She uses it to copy records over and over and over. Then she changes just a few pieces of data as needed.

    She often gets one of two error messages:
    The Clipboard isn't responding, so Commercial Workflow(name of DB) can't paste the Clipboard's contents.

    or

    The command or action 'PasteAppend' isn't available now.

    I have tried to recreate these errors on my computer with my front end. My Front End is the master they copy from. But I can not recreate the error.

    I did check a few things on her front-end and my front end and found 1 setting different
    On the Clipboard there is an options button and the first setting “Show Office Clipboard Automatically" on my front end is not checked and hers was checked. I changed that and the next day she was still having problems.

    I have done a lot of searching on this and I just keep coming up at a dead end. Can anyone out there help me?
  • nico5038
    Recognized Expert Specialist
    • Nov 2006
    • 3080

    #2
    Hmm, can you post the code in the OnClick event of the copy button ?
    I assume it works with the Docmd.MenuItem.
    Better to switch to using the "Docmd.Runcomma nd" command as that's not depending on the available menu items.

    Nic;o)

    Comment

    • missinglinq
      Recognized Expert Specialist
      • Nov 2006
      • 3533

      #3
      I wasn't even aware that the DoRun.MenuItem used the Clpboard for this! As Nico said, this is really a poor way to accomplish this job. Better to use


      [CODE=vb]DoCmd.RunComman d acCmdSelectReco rd
      DoCmd.RunComman d acCmdCopy
      DoCmd.RunComman d acCmdPasteAppen d [/CODE]

      I've seen reports of this type of problem before, from time to time, and the general consensus is that the problem lies with available memory/memory not being released after the Copy & Paste is done. Significantly, every single report I've seen mentions that when this happens, the Clipboard exhibits the same behavior in other Office apps. Also usually reported is that rebooting eliminates the problem at least temporarily, which would seem to support a memory problem being the root cause.

      I'm not sure if the above code will alleviate the problem, since I don't know exactly what mechanism Access uses to carry out the actions.

      What I personally do to address the problem is use code like this, that copies the desired fields to variables, goes to a new record, then plugs the variables back into the correct fields.


      [CODE=vb]'Copy fields from original record to variables

      NewField1 = Me.YourField1

      NewField2 = Me.YourField2

      NewField3 = Me.YourField3 'Go to a new record

      DoCmd.GoToRecor d , , acNewRec

      'Plug in old values into new record
      Me.YourField1.V alue = NewField1

      Me.YourField2.V alue = NewField2

      Me.YourField3.V alue = NewField3

      [/CODE]

      Linq ;0)>

      Comment

      • bwesenberg
        New Member
        • Jan 2007
        • 17

        #4
        Sorry it took so long to get back to this. I have been so busy.
        Here is my code for the duplicat record button.

        Private Sub Command60_Click ()

        On Error GoTo Err_Command60_C lick


        DoCmd.DoMenuIte m acFormBar, acEditMenu, 8, , acMenuVer70
        DoCmd.DoMenuIte m acFormBar, acEditMenu, 2, , acMenuVer70
        DoCmd.DoMenuIte m acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append

        Exit_Command60_ Click:
        RaterID.SetFocu s
        Exit Sub

        Err_Command60_C lick:
        MsgBox Err.Description
        Resume Exit_Command60_ Click


        End Sub

        Comment

        • bwesenberg
          New Member
          • Jan 2007
          • 17

          #5
          I have changed the code to use:

          DoCmd.RunComman d acCmdSelectReco rd
          DoCmd.RunComman d acCmdCopy
          DoCmd.RunComman d acCmdPasteAppen d

          I am having the user test it for a few days and let me know.

          Thanks for the thought you both put into this. If this does not work I will try the other code.

          Comment

          • bwesenberg
            New Member
            • Jan 2007
            • 17

            #6
            The user contacted me already and it did not work.
            I will try the other option.

            Comment

            • bwesenberg
              New Member
              • Jan 2007
              • 17

              #7
              So far so good. I talked with the user today and she said that she has not had a problem.
              Thanks so much for your help.

              Comment

              Working...