Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    4 Star Lounger
    Join Date
    Nov 2002
    Location
    London, Gtr London, England
    Posts
    496
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Dear loungers,

    I have an embedded macro in a form, at some point is does a SetValue. But on running it reports that it cannot do this action in disabled mode. This DB is in a trusted location so what else mighth be stopping it?

    thank you................................. liz

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts
    Since you mention trusted locations, I presume you are working with either Access 2007 or 2010. One way to check to be sure the database is in a trusted location is to check the Macro Settings in the Trust Center Settings (a different selection on the same dialog where you set Trusted Locations). Set that to "enable all macros ..." - if it is set to one of the other settings your macro should still run - but if changing that to allow all fixes it then there is some sort of problem with your trusted locations settings.
    Wendell

  3. #3
    4 Star Lounger
    Join Date
    Nov 2002
    Location
    London, Gtr London, England
    Posts
    496
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Dear Wendel,

    Thank you, yes I'm on 2007. I have now set to allow all macros - that's a bit scary! Anyway the problem still exists. So now I have all macro's enabled and my trusted locations are c:\ and d:\ which is the whole laptop. The only other thing worth mentioning is that I attach to a network at the client. It is a client laptop so there are various firewall and virus bits and pieces but the database is local and resided on my D drive.

    I have now tried:
    ... moving the database to C which shouldn't make the slightest difference - and it didn't.
    ... adding the specific folder that contains the db to the trust settings - didn't make any difference
    ... have digitaly signed all macros (obviously this applies to VB) - didn't make a difference

    Now,I'm out of ideas?

    liz

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts
    By chance have you checked the setting for subfolders to make sure that it is turned on. Otherwise only the current folder level is trusted. That's the only other thing I can think of that might cause the general behavior. But if you added the specific folder where the database is stored that should do the trick. Another thought - the Program Files folder where Access is installed on your PC is normally trusted by default - did that go missing? It normally looks something like:
    C:\Program Files\Microsoft Office\Office12\ACCWIZ\
    Wendell

  5. #5
    4 Star Lounger
    Join Date
    Nov 2002
    Location
    London, Gtr London, England
    Posts
    496
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Dear Wendell,

    I wish it were one of these, all sub folders are on and since I have added both C:\ and d:\ that the whole machine. Im going to recreate the form and the field and see what happens.

    liz

  6. #6
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts
    That's unfortunately the best I can suggest - try creating a simple database and put in one simple one line macro - perhaps to maximize a form when it opens, and see if you get a warning on the new database.
    Wendell

  7. #7
    4 Star Lounger
    Join Date
    Nov 2002
    Location
    London, Gtr London, England
    Posts
    496
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Dear Loungers,

    I nhope someone reading this can suggest something.

    To try to diagnose the probelm I created a new db and tried to write a simple one line macro but SetValue doesn't show as an action. This would suggest that my database is untrusted. I have created a new folder on C and set it to trusted, created new db and tried again. No luck. I have tried with both types of db, new and existing.

    I have even checked the registry and it looks fine having all the locations I set as trusted and subfolder and network folders.

    I think I'm going mad... ???

    Anyone had the same experience and solved it???

    in desperation......................... liz

  8. #8
    3 Star Lounger
    Join Date
    Apr 2002
    Location
    Redditch, Worcestershire, England
    Posts
    233
    Thanks
    0
    Thanked 22 Times in 21 Posts
    In order to have SetValue available you must click the Show All Actions button on the Ribbon - have you done this?

  9. #9
    4 Star Lounger
    Join Date
    Nov 2002
    Location
    London, Gtr London, England
    Posts
    496
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Jeremy, yes you are right, and I had realised after writing the last message that I must have left it off - I was playing with all the setting to solve the trust problem and had forgotten, sorry.

    Nonetheless my trust problem continues! I cannot make Access recognise the databases are in trusted locations.

  10. #10
    3 Star Lounger
    Join Date
    Apr 2002
    Location
    Redditch, Worcestershire, England
    Posts
    233
    Thanks
    0
    Thanked 22 Times in 21 Posts
    Quote Originally Posted by lizat View Post
    Jeremy, yes you are right, and I had realised after writing the last message that I must have left it off - I was playing with all the setting to solve the trust problem and had forgotten, sorry.

    Nonetheless my trust problem continues! I cannot make Access recognise the databases are in trusted locations.
    Just to be absolutely clear: does your last sentence mean that NO macros will run in these databases, OR are you saying that because the SetValue macro doesn't work and the error message you're getting back seems to imply that it's a trust problem? I've googled and found a few posts regarding SetValue problems but they almost always seem to relate to not having Show All Actions switched on!

  11. #11
    5 Star Lounger AndrewKKWalker's Avatar
    Join Date
    Apr 2001
    Location
    Cambridge, UK
    Posts
    1,020
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Just my 2 pence worth.

    I set up a DB on an untrusted file path.
    I could still set up the SetValue Macro
    BUT it would not run because the location was NOT trusted.
    I made the location trusted and it worked fine.

    IF all locations and sub folders are set as trusted (that sub folders tick bit is important if the database is not in the Root Folder)
    Then the database ought to be trusted and ok to macros and VBA

    If it still isn't, then there appears to be something else going on here.

    I have checked this in 2007 and 2010

    If you can upload a copy of the database (you can remove the data apart from a couple of dummy data lines in key tables), then it can be tested elsewhere to see if the issue lies in the database.
    Have you tried it on a different laptop anywhere to see if the issue persists?
    Andrew

  12. #12
    4 Star Lounger
    Join Date
    Nov 2002
    Location
    London, Gtr London, England
    Posts
    496
    Thanks
    8
    Thanked 0 Times in 0 Posts
    I think this must be me being thick because the same database doesn't work on any laptop. And I have the same issue with other databases - I have only recently upgraded everything to 2007. Macros etc in Excel work fine - not related I know but just to show I have used the trust centre successfully except for Access - and Access on every machine, which I what makes me think it's me.

    I have double checked:
    1. C:\ is set as trusted
    2. D:\ is set as trusted
    3. D:\ the folder containing the DB is trusted for good measure
    4. all folders have the sub folders box checked
    5. All macros are enabled (I don't like that but it was an attempt to find the solution)
    6. network locations are enabled
    7. the registry and it looks as though everything is set as described above


    Just to be clear about the macros, all options are set to be visible. i can see SetValue but get a yellow warning triangle on the left and the message on running the macro says that SetValue cannot be run in disabled mode.

    The pc at work is using Windows XP, the other two i tested in are using Windows 7. I have just used a Youtube video (what depths I have sunk to!) and followed it to the letter. Still no joy. This is driving me up the wall....

    IS THIS A CLUE? On the Database Tools ribbon the Show message bar is not checked and disabled. this would imply that the Trust Center setting to show the message bar is not selected. But the message bar is set to show in the trust center so why can't I select it in the ribbon?

  13. #13
    5 Star Lounger AndrewKKWalker's Avatar
    Join Date
    Apr 2001
    Location
    Cambridge, UK
    Posts
    1,020
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Reckon you might need to upload a sanitized copy of the database.
    At least that would determine if it was your setup or something in the database
    Andrew

  14. #14
    4 Star Lounger
    Join Date
    Nov 2002
    Location
    London, Gtr London, England
    Posts
    496
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Andrew, I could do that but since the probelm exists on three machines AND it exists if I creat a new blank db and a new macro with only a SetValue command I don't think it can be that specific db. It something more fundamental and probably simple.

    going to find a tall building!

  15. #15
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts
    I think Andrew's suggestion makes lots of sense. If we can open the database and have macros enabled, then it is something in the setup of security that is causing the problems. On the other had, if we can't make it work, then there must be some corruption or something with the way you are creating the database that is causing the problem.
    Wendell

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •