Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2003
    Posts
    22

    Unanswered: Duplicate Record (clear clipboard)

    Hej,

    Having some problems with duplicating records.

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


    The first time I use the commando it works perfect but when I try to use it again after the first time I get a msg that "Paste append" isn't avalable.

    I know this has something to do with that there allready is data in the clipboard. What I need is a code that cleared the clipboard before or after the code above. Should it do it before or after the code, what do you think?

    lowtek.

  2. #2
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Both before as after

    if you do somethig with the object that is in Clipboard and you do not have anny use for it anymore clear it




    Clipboard.Clear 'if something already is in Mem


    Clipboard.settext = "XYZ"
    Clipboard.paste

    Clipboard.Clear 'to clear it for further use

  3. #3
    Join Date
    Aug 2003
    Posts
    22

    Re: Both before as after

    Originally posted by Marvels
    if you do somethig with the object that is in Clipboard and you do not have anny use for it anymore clear it




    Clipboard.Clear 'if something already is in Mem


    Clipboard.settext = "XYZ"
    Clipboard.paste

    Clipboard.Clear 'to clear it for further use
    How should I use Clipboard.Clear?

    Like object.clipboard.clear?

  4. #4
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Wink The Clipboard is the object

    The Clipboard is the object

    so just :

    Clipboard.Clear

  5. #5
    Join Date
    Aug 2003
    Posts
    22

    Re: The Clipboard is the object

    Originally posted by Marvels
    The Clipboard is the object

    so just :

    Clipboard.Clear
    I get msg "Object required".

  6. #6
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Angry Sorry i assumed Access 2000

    I think tour working in 97 or even 95

    still searching but is it possible to set your object to nothing

    so something like this

    x as object

    set x = frmAction

    x = nothing


    Or even quick and dirty

    Dim A$
    A$ = " "
    'Do your thing then copy A$ :-)
    Desperate messure needs desperate action

  7. #7
    Join Date
    Aug 2003
    Posts
    22

    Re: Sorry i assumed Access 2000

    Originally posted by Marvels
    I think tour working in 97 or even 95

    still searching but is it possible to set your object to nothing

    so something like this

    x as object

    set x = frmAction

    x = nothing


    Or even quick and dirty

    Dim A$
    A$ = " "
    'Do your thing then copy A$ :-)
    Desperate messure needs desperate action
    I AM working with Access2000.

    Could you post how I should put the entire code to make it work.

    This is how it looks now:

    Private Sub Command751_Click()
    On Error GoTo Err_Command751_Click

    Dim A$
    A$ = " "
    DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
    DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
    DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'paste
    DoCmd.CopyObject A$

    Exit_Command751_Click:
    Exit Sub

    Err_Command751_Click:
    MsgBox Err.Description
    Resume Exit_Command751_Click

    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •