Results 1 to 8 of 8
  1. #1
    PaulLuke
    Guest

    Purposely locking a record

    A user adds a record into a database, later in the day he edits it and adds more info. On the next day the database admin reviews the records.
    Is it possible to have a checkbox that only the admin could see, I would like the admin to enter a check in the box which makes the record no longer open for editing (locks it). In order for a user to edit again the admin would have to open record and uncheck the lock.
    Is this possible?

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Purposely locking a record

    This will work if the users are never actually allowed into the tables, which is merely good design anyhow. However, if the users are allowed to create their own queries, etc., you can't do this because you can't hide a field in a table.

    If your users are kept out of the interface, you can base forms, etc., on queries that don't include that field except in the Where clause. You can then filter the records available to the form based on whether that field is true or false.

    There actually are ways to have a database where none of the tables are in the front end and there are no table links, but that is both advanced and requires Access 2000/ADO.
    Charlotte

  3. #3
    PaulLuke
    Guest

    Re: Purposely locking a record

    The users are never allowed in the table. I use ASP pages to allow them access to only the fields they need to see. The records are then reviewed and verified through an Admin site. Security is not an issue.
    I just have not been able to figure out how to prevent a user from editing a record after it is reviewed.
    I think I need it to work like the way locking a topic works in a forum.
    Am I explaining myself clearly, I am not sure since I've been on this project way to long.

    Thanks

  4. #4
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Winnipeg, Canada
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Purposely locking a record

    Hi,

    I think you already answered your own question:

    I would like the admin to enter a check in the box which makes the record no longer open for editing (locks it). In order for a user to edit again the admin would have to open record and uncheck the lock.

    Charlotte is correct. You won't be able to hide the field or 'lock' the record. You simply make the record unavailable
    for editing by the user when (where fldCheck=True) or the converse: make it available only where fldCheck=False.

    The admin people would need a slightly modified version for finding a record that would not include the 'where' condition.

  5. #5
    PaulLuke
    Guest

    Re: Purposely locking a record

    Okay, I can see that. But the record still needs to be viewable. Or available for viewing during a search result by the managers, just not editable.
    All users have permissions to add, view, modify, but not delete. I would like to make it so they can no longer edit after it has been reviewed.

    Thanks

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Purposely locking a record

    You're going to have to take care of that in your ASP. This isn't something you would control from Access anyhow if you're presenting the data through ASP. It isn't an Access issue, it's a presentation issue.
    Charlotte

  7. #7
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Winnipeg, Canada
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Purposely locking a record

    OK. I am not familiar (yet) with the ASP/HTML functionality but I suppose you can handle it there in a similar way as you would be able to in Access.

    Firstly, Charlotte is right. It is a presentation issue, not a database/table/fields issue.

    It seems to me the program needs to test for two conditions:
    a. Is this an admin person or not
    b. Is the record checked or not.

    Then the logic would simply become:
    If record=Checked AND User<>AdminPerson Then
    .....DisableMostControlsOnTheScreen
    End if

    That way you can still see the data, you just won't be able to do anything to it via the form.

    I like to hear more about how this turns out for you. <img src=/S/smile.gif border=0 width=15 height=15>
    I may not be much of a help, but I sure am learning a lot in a hurry.

  8. #8
    PaulLuke
    Guest

    Re: Purposely locking a record

    Thanks so very much Charlotte & Kmedgyes, your reply has guided me to the solution I needed.

    Kmedgyes, I will let you know how it turns out.
    The deadline is April 1. I should have it running by then.

    Thanks again....=)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •