The 'Copy' RunCommand cannot be run in disabled mode

Stevo3737

New member
Local time
Today, 15:48
Joined
Feb 17, 2010
Messages
9
I have a duplicate record macro button. In Access 2007 it works fine. However, when I convert the file to 2002-2003 format I get the error posted in the title.

I basically added my entire C: drive to the trusted locations, but that didn't do anything.
 
I have a duplicate record macro button. In Access 2007 it works fine. However, when I convert the file to 2002-2003 format I get the error posted in the title.

I basically added my entire C: drive to the trusted locations, but that didn't do anything.

Can you post the code behind the button this will help give you a solution.

Trevor
 
Can you post the code behind the button this will help give you a solution.

Trevor

Here's a screen shot, sorry for it being in excel I was having trouble meeting the file size limitations.

I'm guessing it's something to do with the yellow caution symbols. When you scroll over those it says. "This action will not be allowed if the database is not trusted." Hence why I added my entire C: drive to trusted locations.
 

Attachments

It sounds as though the setting for 2007 has been set to allow Macros. Please try the following:

Select the office button top left
Go to Access Options bottom right
Select Trust Settings (on left)
Select Trust Centre Settings )(on right about 3/4 way down
Check to see if Enable all macros has been selected (last in list)

Trevor
 
No all Macros are enabled. I am using the same version of Access to open the file, the file is just saved as an older format. Eventually this DB is going to be used on a computer which only has office 2003.
 
No all Macros are enabled. I am using the same version of Access to open the file, the file is just saved as an older format. Eventually this DB is going to be used on a computer which only has office 2003.


In the form design you can add a command button and using the wizard it will offer you a facility to duplicate the record, this will give you the vba code with error handler.

I would suggest you give that a go, as you can then see if it works, and edit the code so it becomes a goto new record, if there are id numbers you may need to alter the code slightly.

One last idea is have you thought of converting the macro to VBA and see if you can step into the code to see where the fault is?

Good luck

Trevor
 
Thanks for the help anyway. I did use the wizard to create this duplicate record. I was trying to avoid writing more VBA but it looks like a might have to make the plunge.
 
part of your problem may be that you are using macro stuff that doesn't exist in 2002-2003 format (There is no ON ERROR macro action in 2002-2003 format).
 
Hmm so If I add the button while the file is in 02-03 format perhaps the button will work correctly? Or would I have to create the button using office 03?

Otherwise maybe I can find what the macro would look like in 02-03 format and then just adjust my macro.

Thanks again SOS.
 
Well I added the button to the file in 02-03 format and It just created the VBA for me. This is good except for two problems. #1 I am getting an error because of duplicate primary keys. #2 I am looking to increment date by 364 days because we are re-booking events for the same day of the week next year.

I'm not sure how all that acCmdSelectRecord stuff works, but it doesn't seem like I will be able to edit fields doing the duplicate record that way. Which leads me back to pulling individual variables and inputting them into the new record. This is what I was trying to avoid in the first place, but at this point it probably would have been quicker.:rolleyes:

If anyone has any other ideas to remedy this it would be appreciated. I'm probably not going to jump into it for another day or two.
 
thanks bud, I'll look into that. Working with dates and time is a pain haha.
 

Users who are viewing this thread

Back
Top Bottom