Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2013
    Posts
    1

    lock rows in table whilst allow edits in others

    Hi

    I have a form that has a number of rows and i would like users to be able to edit some rows but not other. the non edit rows will have an entry in a field that the other won't.

    Is it possible to have diffrent edit right in the same form but for diffrent rows?

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,544
    If you're saying that if a given Control has data in it then that Record will not allow editing, then, replacing TargetField with the actual name of the Textbox that holds the Field that this will be based on:
    Code:
    Private Sub Form_Current()
     If Nz(Me.TargetField, "") <> "" Then
      Me.AllowEdits = False
     Else
      Me.AllowEdits = True
     End If
    End Sub


    If this is not the situation, you need to explain your need a little more clearly.

    Linq ;0)>
    Last edited by Missinglinq; 02-11-13 at 18:12.
    Hope this helps!

    The Devil's in the Details!!

    All posts/responses based on Access 2003/2007

Posting Permissions

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