Results 1 to 2 of 2
  1. #1
    KMan is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Jun 2016
    Posts
    12

    Password Protect Field


    I know you can password protect a database, but is it possible that a password can be required to add a new field to a form? As in if someone goes to click on add new field to a form, a password is then required to do so?

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    I think you mean: Enter a data into a field, (not add field to form), correct?
    If so, the field on the form would be locked. Add a button to 'edit'
    the user enters password, the field unlocks.

    Code:
    sub btnEdit_click()
       txtField.locked = IsEditPassword() 
    end sub
    
    sub function IsEditPassword() as Boolean
     dim vRetval
    
     vRetval = inputbox("Enter Password","Edit field") 
    
    select case vRetval
      case "MyPass"
          IsEditPassword = false     'we want the opposite to unlock the field.locked = false
      case else     
          IsEditPassword = true
    end select
    end function

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

Similar Threads

  1. Password Protect a Macro
    By Pure Salt in forum Security
    Replies: 5
    Last Post: 10-22-2014, 07:32 AM
  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