Results 1 to 5 of 5
  1. #1
    MichaelA is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Sep 2019
    Location
    Wisconsin
    Posts
    139

    Lock all field values except one in query results


    I have a form that sets query criteria and runs the query. I would like to leave one field unlocked so that the data can be changed and update to the table. THe rest of the cells I would like to leave locked so they cannot be changed. Is this possible. If so, how?

    Thank you!

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,979
    Yes. Lock each of the controls except one in the property sheet.

    Or do that in code using Me.controlname.locked =true for each control except one.

    Or use the tag property to do this. See http://www.mendipdatasystems.co.uk/s...ols/4594398114
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    MichaelA is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Sep 2019
    Location
    Wisconsin
    Posts
    139
    When I lock the control for the combo box in the form, I can no longer select an option from the drop down list.


    Quote Originally Posted by isladogs View Post
    Yes. Lock each of the controls except one in the property sheet.

    Or do that in code using Me.controlname.locked =true for each control except one.

    Or use the tag property to do this. See http://www.mendipdatasystems.co.uk/s...ols/4594398114

  4. #4
    MichaelA is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Sep 2019
    Location
    Wisconsin
    Posts
    139
    I apologize. I need to be more clear. It is within the query results where I don't want changes to be made.

  5. #5
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,979
    You can't lock individual fields in a query. The whole query is either editable or its read only.

    However locking individual fields can be done on a form using any of the methods I described
    If you also want a combo to be selectable, don't lock that control.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Replies: 4
    Last Post: 10-13-2015, 02:29 PM
  2. Highlight Duplicate Values in Query Results
    By TJ1010F in forum Queries
    Replies: 3
    Last Post: 06-21-2015, 05:51 PM
  3. Limiting Query Results to Unique Values
    By orangeman2003 in forum Queries
    Replies: 2
    Last Post: 12-25-2013, 01:08 PM
  4. Replies: 8
    Last Post: 10-22-2012, 07:43 PM
  5. Replies: 9
    Last Post: 12-13-2010, 09:25 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