Check box for locking

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • demonseedgfx
    New Member
    • Jan 2007
    • 2

    Check box for locking

    I am attempting to create a check box that when made "yes" locks the form from all other editing. I do still need to create new forms within the data base. Does anybody know how to do this or even if its possible, even a button that will do it rather than the check box would be welcome. My access knowledge is very limited. I got the project by been the person with the least work load. Thanks.
  • PEB
    Recognized Expert Top Contributor
    • Aug 2006
    • 1418

    #2
    U need the form locked for editing and the user that uses the form can't introduce any info anywhere?

    Or simply when user introduces record other can't do anything on this record?

    Comment

    • demonseedgfx
      New Member
      • Jan 2007
      • 2

      #3
      Originally posted by PEB
      U need the form locked for editing and the user that uses the form can't introduce any info anywhere?

      Or simply when user introduces record other can't do anything on this record?
      A user creates a form. Any number of users may view and some may edit the form. The form is for work status, so further entries may be made untill the job is complete. Once the "job complete" box is checked I want the form to be locked so no further entries can be made on that form.

      Comment

      • PEB
        Recognized Expert Top Contributor
        • Aug 2006
        • 1418

        #4
        Originally posted by demonseedgfx
        A user creates a form. Any number of users may view and some may edit the form. The form is for work status, so further entries may be made untill the job is complete. Once the "job complete" box is checked I want the form to be locked so no further entries can be made on that form.
        In this case in ur form u need a bit VB

        In Form properties go in Current, choose event procedure and type

        Code:
        If me!FIeld1=Yes then
        Me.AllowEdits = Yes
        else
        Me.AllowEdits = no
        end if
        me!FIeld1 is the name of ur respective field that is filled with Yes or No

        I assume that Yes or No is a checkbox and not textfield!

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32662

          #5
          Vladi,
          You have too much code there ;)
          Code:
          Me.AllowEdits = Me.chkJobComplete
          It will work, of course, but you will not be able to un-check it afterwards as this disables even updating of the Job Complete checkbox itself.

          Comment

          Working...