Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2005
    Posts
    28

    Unanswered: Unlocking individual records on a form

    I am opening a form that is viewed in datasheet view.

    When the form is first opened I would like all the records to be locked. When the user clicks on a specific record I would like them to be able to edit just that record.

    Was thinking I could use a checkbox for each record? By default the checkbox is ticked and the record is locked, when unticked the record becomes editable?

    Can someone explain how to set this up please? Or is there a better way of doing this?

    Many thanks
    John

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    if you are suing continuous forms then you can't achieve what you want. The Access Form designer treats all the records controls as the same. so you can't lock / unlock one record and leave the rest 'free'

    You could, say, select a record bring up a popup modal form to allow edits to that specific record, leaving the continuous form locked. Thats about as close I think you can get.

    However could I ask why you want to this?
    By default Access forms only ever allow you to edit one record at a time. if you click off the edited record it automatically saves the changes. AFAIK it only attemtps to get a record lock when you start to make changes to the next record

    What design requirement are you trying to meet with this?
    What form of recoird locking model are you deploying with your application?

    HTH

  3. #3
    Join Date
    Apr 2005
    Posts
    28
    Thanks for your reply!

    The user selects some criteria in a couple of drop down boxes and then opens a form that displays all of the stock we are holding based on this criteria. For example, they select motherboards in the drop down menu and then the form displays in datasheet view all of the motherboards we have in stock.

    I don't want this data to be accidently edited so have locked the fields in this form. However I would like the user to have the option of selecting one of the records and editing if need be.

    Any ideas?

    Thanks
    John

Posting Permissions

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