Can you have a user not be able to change anything on a form afterup date?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gina farrow
    New Member
    • Jan 2011
    • 23

    Can you have a user not be able to change anything on a form afterup date?

    I have user inputing info in a form

    I want to input data ,then update the data after form is updated the user can no longer edit what he has done. when the user goes back to the form the user cant change things..
  • TheSmileyCoder
    Recognized Expert Moderator Top Contributor
    • Dec 2009
    • 2322

    #2
    Look at your forms properties and set:
    Code:
    AllowEdits:     No
    AllowDeletions: No
    AllowAdditions: Yes
    DataEntry:      Yes

    Comment

    • gina farrow
      New Member
      • Jan 2011
      • 23

      #3
      thank you that works,but what if you want to keep one record open to edit.

      Comment

      • TheSmileyCoder
        Recognized Expert Moderator Top Contributor
        • Dec 2009
        • 2322

        #4
        I need a more precise explanation of your requirements.

        Comment

        • gina farrow
          New Member
          • Jan 2011
          • 23

          #5
          a user inputs data in a form after update nothing can be changed in the fields except one field.

          Comment

          • gina farrow
            New Member
            • Jan 2011
            • 23

            #6
            A form afterupdate, form fields cannot be changed except for one field.

            Comment

            • TheSmileyCoder
              Recognized Expert Moderator Top Contributor
              • Dec 2009
              • 2322

              #7
              You need to be precise with your words, because in post 3 you talk about keeping 1 record open to edit, and in posts 5 and 6 you talk about a field. A field is a column in a row/record.

              Now, this code in the Current Event of your form should accomplish what you want (or atleast what you have described). You will of course have to replace the field names as appropriate.

              Code:
              Private Sub Form_Current()
              'The fields you want to disable
               Me.Field1.Enabled=Me.NewRecord
               Me.Field2.Enabled=Me.NewRecord
              
              'The field you want to keep open
               Me.Field3.Enabled=Not Me.NewRecord
              End Sub
              Another option is to use Field.Locked property. Its a matter of taste. Play around and see what suits you.

              Comment

              • gina farrow
                New Member
                • Jan 2011
                • 23

                #8
                I do apologize if I wasnt clear. I have a form that the user can input data. If the user goes back to the data he previously inputed, he can only change one record and the other fields are disabled. When the user goes back to a new record,it should allow them to type in all the fields and so on.

                Comment

                Working...