Results 1 to 6 of 6
  1. #1
    Gina Maylone is offline Always learning
    Windows 10 Access 2016
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544

    Allow dropdown (search) selection when user permissions are read only (allowedits=false)

    Hello everyone! I have setup a little login/permissions function in a db. If the user's level is 1 then they cannot edit the record, but I need to allow them to search for a record via a dropdown box. Any thoughts on how I can do this? Thank you in advance!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    use the level to open the form as readonly:

    Code:
    IF vUserLevel = 1 then
       docmd.OpenForm "frmEdit",,,"[id]=" & cboBox ,acFormReadOnly 
    else
    
    docmd.OpenForm "frmEdit",,,"[id]=" & cboBox
    endif

  3. #3
    Gina Maylone is offline Always learning
    Windows 10 Access 2016
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544
    Hey Ranman! You lost me with that one. I don't get the purpose of ""[id]=" & cboBox " Thanks!

  4. #4
    Gicu's Avatar
    Gicu is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    For level 1 you can set the form's RecordsetType to snapshot which will render the form read-only but allow the unbound combo(s) to do the search.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  5. #5
    Gina Maylone is offline Always learning
    Windows 10 Access 2016
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544
    Perfecto! Thanks so much Vlad!!!

  6. #6
    Gicu's Avatar
    Gicu is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    You're very welcome!
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

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

Similar Threads

  1. Replies: 11
    Last Post: 03-14-2019, 09:30 PM
  2. Replies: 3
    Last Post: 03-23-2018, 06:49 PM
  3. Replies: 4
    Last Post: 09-02-2014, 11:43 AM
  4. Replies: 2
    Last Post: 03-18-2012, 05:37 AM
  5. Form combo box not working with AllowEdits = False
    By jgelpi16 in forum Programming
    Replies: 3
    Last Post: 02-04-2011, 05:08 PM

Tags for this Thread

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