Solved Clear Clipboard đź“‹

Sarah.M

Member
Local time
Today, 05:36
Joined
Oct 28, 2021
Messages
335
Hi, Plz note, My VBA is blocked by IT for security reason.
I can use only Expression builder, Macros, Queries, Tables, Forms and Reports only.
------------------------------------------------
Can I clear Clipboard by Macro Action?
Because I have a command button on click it will duplicate the record. sometimes I got error message, so I want to put clear Clipboard Macro Action before trigger duplicate
Is that possible?

Plz help 🙏
 
I have an old version of Access (2010) at home - all I've got now that I'm retired. It does not appear to have any clipboard commands. I cannot address other version capabilities.
 
Can you simply use the macro action "On Error" > Next, right before the command that is causing the harmless error.
 
Prevention is always better than cure
Suggest you prevent duplicate records being allowed by indexing appropriate fields in table design and setting allow duplicates = false
 
I thought that was the whole point of the button in the first place, to duplicate the record. No idea why that is necessary but...
 
Hi, thank you for your replying
If I use duplicate record multiple times i got this message, it is working fine but I got error sometimes
"The Clipboard isn't responding so can not paste the Clipboard's contents"

1647149388341.png
 
Last edited:
Prevention is always better than cure
Suggest you prevent duplicate records being allowed by indexing appropriate fields in table design and setting allow duplicates = false
Thanks for replying @isladogs
No I mean copy and past the record plz see my post #6
 
Hi, thank you for your replying
If I use duplicate record multiple times i got this message, it is working fine but I got error sometimes
"The Clipboard isn't responding so can not paste the Clipboard's contents"

View attachment 99089
If I read that macro correctly, you go to a new record, copy it, and then paste it. That means you are copying an empty record, which is probably why you're getting the error when you try to paste it.
 
My VBA is blocked by IT for security reason.
What is your MSO version?
Are you able to write to system reester?
For MSA 2016 - .reg file:
Code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Access\Security\Trusted Locations\Location0]
"Path"="D:\\AProjects\\"
"AllowSubfolders"=dword:00000001
"Description"="My VBA Projects"
Just replase "Path"="D:\\AProjects\\" - to your locatoin ...
 
if you created the macro using the Command Button Wizard, you'll get a different macro:
2022-03-14_20-07-43.png

2022-03-14_20-08-36.png
 
What is your MSO version?
Are you able to write to system reester?
For MSA 2016 - .reg file:
Code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Access\Security\Trusted Locations\Location0]
"Path"="D:\\AProjects\\"
"AllowSubfolders"=dword:00000001
"Description"="My VBA Projects"
Just replase "Path"="D:\\AProjects\\" - to your locatoin ...
Thanks for replying
Office Pro Plus 2016
I tried I could not, becuse my user is limited permission WinOS asked me for admin permission
 

Users who are viewing this thread

Back
Top Bottom