disable pop up box

  • Thread starter Thread starter fishqqq
  • Start date Start date
F

fishqqq

I have put a macro on a form which closes the form. When closing the
form a pop up box "you have copied a large amount of data...." asking
me if i wish to save this on the clipboard etc.

is there a way to prevent this box from appearing. i don't need to
save this data - i don't want the user to see the pop up box if
possible.

thanks
 
I have put a macro on a form which
closes the form. When closing the
form a pop up box "you have copied
a large amount of data...." asking
me if i wish to save this on the
clipboard etc.

I think this is not due to closing a form in your Access application, but a
function of Windows when you close the application itself. I'm reasonably
certain it is beyond your control, at least in Access -- most often when I
see that message, it's when I've been working in unrelated graphics software
on large image files.

Perhaps there might be some VBA code you could use to get to a Windows API
to empty the clipboard when your application closes (the Close event of an
invisible Form is a good way to "do something when the application closes"),
but I'm not sufficiently familiar with Windows Clipboard APIs to advise on
that.

I've never thought it a problem, since I see it rarely, if ever, from
Access, but with some frequency with other Windows apps.

Larry Linson
Microsoft Office Access MVP

Larry Linson
Microsoft Office Access MVP
 
Perhaps there might be some VBA code you could use to get to a
Windows API to empty the clipboard when your application closes
(the Close event of an invisible Form is a good way to "do
something when the application closes"), but I'm not sufficiently
familiar with Windows Clipboard APIs to advise on that.

Based on this:

http://www.mvps.org/access/api/api0049.htm

....it seems to me that all you need is this Windows API declaration:

Private Declare Function EmptyClipboard Lib "user32" () As Long

Whether or not you make that public or wrap it in your own
sub/function is up to you.

I've been using clipboard code from the Access Web (i.e.,
mvps.org/access) for years in order to copy error messages to the
clipboard so my users can email with error messages without having
to send a screenshot. I've used it for other things, as well (e.g.,
copy an address to clipboard so you can paste it into a Word
document).
 
Back
Top