Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228

    locked existing records and ability to add new in the same form.


    Click image for larger version. 

Name:	jobs form.png 
Views:	10 
Size:	22.2 KB 
ID:	21496This is the form I have for "notes" relating to "jobs". Notes are added when dates are changed for example so its important that old notes cant be amended at all. We need to keep track of changes made by our clients. The form works well, the date added is the current date and its un-editable and the site name is generated from the main form (this is a sub form that opens for each specific "Job").

    I cant make the actual notes field un-editable because I need users to add new notes. But I want the already existing ones to be locked.

    I would like to keep the form as it is and display the older notes (locked), and also have a black space to add new. Is this possible?

    Alternatively, Ill create a new form for adding notes and this can be used to view.

    Look forward to your replies.

    Andy.


    Edit - as you see in the picture I went back and deleted the notes from existing.

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    I would suggest some code in the forms On Current event to determine if it is a new record and then set the forms Allow Edits property accordingly.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    Thanks for the reply bob, I'm a beginner, would you be able to explain that to me like I'm an idiot?

    Where would I put the code?

    then disable edits for the whole form or?

    If I knew how to do it, it would be done

    thanks! andy

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    Hi Andy. Try the following code in the On Current event of the form:
    Code:
    If Me.NewRecord = True Then
      Me.AllowEdits = True
    Else
      Me.AllowEdits = False
    End If
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    Brilliant! Now I wait for people to complain they made mistakes in the notes and I have to change them manually

    at least the data is secure! Thanks Bob

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

Similar Threads

  1. Replies: 9
    Last Post: 12-09-2014, 09:02 AM
  2. Replies: 5
    Last Post: 07-09-2014, 01:54 PM
  3. Replies: 4
    Last Post: 05-12-2014, 12:24 PM
  4. Replies: 2
    Last Post: 05-02-2013, 03:01 AM
  5. Replies: 6
    Last Post: 04-27-2011, 06:12 AM

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