Results 1 to 5 of 5
  1. #1
    JMR is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    17

    Need to Unlock a single field on a locked subform on a main form.

    I have a main form that locks the one subform after 12 hours. I need to be able to keep just one field on the subform unlocked at all times. There are too many fields on the subform to lock and unlock each one indivdually. Right now I just lock the whole subform and unlock the whole subform with a single vba code. But i cant seem to unlock the single field on the subform, once the whole subform is locked. any ideas?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Can't. If subform is locked everything is locked.

    Solution in cross post how to unlock one field on a locked subform | Access World Forums (access-programmers.co.uk)

    Why do you need to lock subform? What allows subform to unlock?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    JMR is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    17
    I lock the subform to prevent users from changing old data. there is a manager override button that unlocks it when needed. I need the NOTES field in the subform to NOT be locked so it can be edited by anyone anytime. youre saying there is no way?

    jm

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Did you read answer in your other thread?

    Then why would records be available for 12 hours?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Join Date
    Apr 2017
    Posts
    1,679
    On main form, have a tab control with 2 pages;
    On one of tab's place your current subform;
    On second tab place a subform based on same source as 1st one, where are some locked/disabled controls needed to understand what kind of info the record contains, and an unlocked/enabled control linked to field you want to be able to edit. This second subform remains unlocked, and adding/deleteng records on this subform must be restricted.

    Edit: In case you have enough free space in main form, and you can make the second subform small enough, you can also do without tab control - you can simply place 2 subforms into your main form.

    You even can use a single form as second one, which is linked to active row of 1st subform (you must have on main form a hidden unbound control, where the ID for active row in 1st subform is written by OnCurrent event of 1st subform). With such design, the second subform has only a single control - the one linked to editable field - visible. The user selects a record in fst subform, and edits the value of selected row field in control on second subform.

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

Similar Threads

  1. Replies: 3
    Last Post: 07-01-2022, 07:11 AM
  2. Replies: 1
    Last Post: 04-23-2019, 06:17 AM
  3. Replies: 8
    Last Post: 03-27-2019, 07:31 AM
  4. Replies: 1
    Last Post: 08-02-2012, 02:11 PM
  5. Replies: 0
    Last Post: 07-10-2010, 08:11 AM

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