You Copied a Large Amount of Data onto the Clipboard

G

Guest

Hi.

I have a form with a subform. There is a lot of I/O happening when the value
of a text box changes on the form. When I close out the form I get the
message "You Copied a Large Amount of Data onto the Clipboard".

I would like to suppress this message but have been unable to do so. I tried
the Form_Error event but the code doesn't go there. I put a breakpoint in the
Close Event and the message appeared after the Close Event but did not get to
the Form_Error event.

Any suggestions will be greatly appreciated :)

Rita
 
G

Graham Mandeno

Hi Rita

Here is some code to clear the clipboard. Paste this code into a new module

========= start ==========
Option Explicit

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

Public Sub ClipboardClear()
Call OpenClipboard(0&)
EmptyClipboard
CloseClipboard
End Sub
======== end ==========

Now, in your Form_Unload event, simply call ClipboardClear.
 
G

Guest

Fanatstic! It worked beautifully.
I had searched Google for a response and there was one but I would have had
to sign up for a subscription to get the answer.

Thank you so much Graham.


Graham Mandeno said:
Hi Rita

Here is some code to clear the clipboard. Paste this code into a new module

========= start ==========
Option Explicit

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

Public Sub ClipboardClear()
Call OpenClipboard(0&)
EmptyClipboard
CloseClipboard
End Sub
======== end ==========

Now, in your Form_Unload event, simply call ClipboardClear.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

RitaG said:
Hi.

I have a form with a subform. There is a lot of I/O happening when the
value
of a text box changes on the form. When I close out the form I get the
message "You Copied a Large Amount of Data onto the Clipboard".

I would like to suppress this message but have been unable to do so. I
tried
the Form_Error event but the code doesn't go there. I put a breakpoint in
the
Close Event and the message appeared after the Close Event but did not get
to
the Form_Error event.

Any suggestions will be greatly appreciated :)

Rita
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top