Results 1 to 6 of 6
  1. #1
    Pure Salt is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Apr 2014
    Posts
    60

    Password Protect a Macro


    I have a macro that imports 'new' customer data from another database. Is there a way I can password protect the macro so someone cannot accidently run it?

    If it helps the macro will be run directly from the switchboard.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    That may involve workgroups,...

    what about hiding the db screen?
    what about assinging code so only a certain userid can run it? if userid = dlookup("[userid]","tUsers")

  3. #3
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    more than 1 way to skin this cat; here's an approach:

    put an unbound textbox on the form/switchboard - - - -

    then for your macro - precede it with an If statement; If me.TextBoxName = "valid password" then........and run your macro....

  4. #4
    Pure Salt is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Apr 2014
    Posts
    60
    Thank Nic. Not sure what I'm doing wrong but I can't get it to work

  5. #5
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    in 2013 macro you wouldn't use: me.textboxname


    try using the entire control name: [Forms]![FormName].[TextBoxName]

  6. #6
    Pure Salt is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Apr 2014
    Posts
    60
    Thank you Nic

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Password Protect Tab Control
    By JMR in forum Forms
    Replies: 1
    Last Post: 05-09-2014, 04:32 PM
  2. Password protect a form
    By recon2011 in forum Forms
    Replies: 10
    Last Post: 11-18-2012, 04:36 PM
  3. password protect form
    By nkuebelbeck in forum Forms
    Replies: 2
    Last Post: 01-15-2012, 01:02 PM
  4. readonly password protect
    By mlgehle in forum Security
    Replies: 1
    Last Post: 03-13-2010, 08:59 PM
  5. Password Protect Forms
    By Robert M in forum Programming
    Replies: 3
    Last Post: 01-15-2010, 01:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums