Want dupe btn to clear clipboard immediately after duping

  • Thread starter Thread starter Rubix via AccessMonster.com
  • Start date Start date
R

Rubix via AccessMonster.com

I need code to clear the clipboard after I dupe a record so that it does not
fill up or give me the msgbx pertaining to whether or not I want to save the
info on the clipboard EVERY time I close the form!
I saw it somewhere before, I don't know if it was here or another site.
Can anyone point me in the right direction?
I'm going to want to use this code again on a "Renew" button which will renew
(dupe with an automatic "R") and DateAdd("y",1, need code/syntax here for the
date currently in record to be updated...).
ANY help?
PLEASE?
Thanx y'all.
 
Here's one way of emptying the Windows clipboard (the Office clipboard
is a different matter):

Declare Function CloseClipboard Lib "user32" () As Long
Declare Function EmptyClipboard Lib "user32" () As Long
Declare Function OpenClipboard Lib "user32" _
(ByVal hWndNewOwner As Long) As Long


Public Sub EmptyTheClipboard()
Dim lngRetVal As Long

lngRetVal = OpenClipboard(Application.hWndAccessApp)
lngRetVal = EmptyClipboard
lngRetVal = CloseClipboard

End Sub
 
Back
Top