Results 1 to 4 of 4
  1. #1
    JoaoSousa is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2020
    Posts
    13

    Locking further edition - Help

    Hi,



    I'll have a form where users will input data for an entry that will be divided in multiple ones. (1 visit - 6 samples for example). Please see image.


    Unlocked for edition
    Click image for larger version. 

Name:	No sign.PNG 
Views:	11 
Size:	29.9 KB 
ID:	42309
    Locked for edition
    Click image for larger version. 

Name:	Sign Locked.PNG 
Views:	11 
Size:	31.7 KB 
ID:	42308

    When analysing the multiple samples I have the following code for, what we're trying to be an, auditable process.


    Private Sub Form_Load()

    If IsNull(Me.QCDate) = True Then
    Me.ASMtxt.Enabled = True
    Me.Epithtxt.Enabled = True
    Me.LPtxt.Enabled = True
    Me.CommentsMicrotxt.Enabled = True
    Me.BiopsySizetxt.Enabled = True
    Me.TotalAreatxt.Enabled = True
    Else
    Me.ASMtxt.Enabled = False
    Me.Epithtxt.Enabled = False
    Me.LPtxt.Enabled = False
    Me.CommentsMicrotxt.Enabled = False
    Me.BiopsySizetxt.Enabled = False
    Me.TotalAreatxt.Enabled = False

    End If



    End Sub
    Private Sub SaveSlidebtn_Click()


    If IsNull(Me.QCDate) Then
    Me.QCDatetxt = Now()
    Me.UserNametxt = TempVars("UserName").Value
    End If



    End Sub
    Private Sub Command269_Click()


    If IsNull(Me.QCDate) = True Then
    MsgBox "Couldn't lock, please sign the entries."
    Exit Sub
    End If


    SetProperty:
    If MsgBox("Saving the data will lock further entries." & _
    vbCrLf & "Confirm all entries are completed. Would you like to proceed?", vbYesNo, "Save Data") = vbYes Then


    If IsNull(Me.QCDate) = False Then
    Me.ASMtxt.Enabled = False
    Me.Epithtxt.Enabled = False
    Me.LPtxt.Enabled = False
    Me.CommentsMicrotxt.Enabled = False
    Me.BiopsySizetxt.Enabled = False
    Me.TotalAreatxt.Enabled = False
    End If
    End If




    End Sub
    As you can see on the two images, if you sign 1 entry and, for some reason, you load the form again all entries will be locked. Is there any way of having the text box Enabled by row?
    The subform is a multiple entry form that can have a variable number of entries. It would be ideal to have boxes enabled by row if signed.
    As you can see I have a warning in the locking button for the user to know, but if I could avoid this problem it would be amazing.

    Thank you!

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    In continuous forms,ALL records behave the same. All locked or unlocked.
    so you need to edit via SINGLE record form.

    have a locked list to pick from, then edit single rec.

  3. #3
    JoaoSousa is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2020
    Posts
    13
    That is unfortunate! The potential would be great if it was possible!

    Most welcome, access may be daunting but definitely fun to work with once you get some insight.

  4. #4
    Join Date
    Apr 2017
    Posts
    1,673
    You can set records locked/unloked using Current event of continous form. When you activate record which must be unlocked, all other records are unlocked too, but to edit other records, user has to activate another record, and this triggers current event which resets record locking before user can do anything.

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

Similar Threads

  1. Replies: 3
    Last Post: 04-18-2018, 09:02 PM
  2. Is anyone using Erwin Community Edition
    By orange in forum Database Design
    Replies: 1
    Last Post: 10-23-2017, 04:35 PM
  3. error in the 2010 edition only
    By azhar2006 in forum Forms
    Replies: 3
    Last Post: 10-02-2014, 01:13 PM
  4. Replies: 3
    Last Post: 01-26-2014, 06:32 PM
  5. Replies: 7
    Last Post: 06-14-2013, 09:47 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