Page 2 of 2 FirstFirst 12
Results 16 to 30 of 30
  1. #16
    Minty is offline VIP
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Possibly, but I think you are heading down the right path.
    If you know the old system was flawed, and this redesign is making sense, then stick with it.

    Most developers on here will tell you it's far better to start again, than "adjust" an existing system if it wasn't working.


    But if you need to store your data a bit differently and or introduce some changes now is the time to strike, and it's the best time to make those "improvements" as necessary change.
    Obviously your working reports etc, are fine, and can be tweaked if new data is required.

    From your earlier description, it sounded as if the AFR numbers were possibly being reused ? That sounds a bit dangerous from a data perspective?
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  2. #17
    billgyrotech1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2019
    Posts
    179
    The previous AFR Numbers were accidentally reused and we had to contact the Customers to have their paperwork replaced. It is a bad thing to have identical AFR numbers in the field.

    So avoiding this problem is an absolute must.

    As far as how this new system is going so far so good.

    Thank you so much

  3. #18
    billgyrotech1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2019
    Posts
    179
    Could the records that have "Closed" in the Status field be locked for editing including the parts for that record?

  4. #19
    billgyrotech1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2019
    Posts
    179
    I found this to lock the record for the form but how to also lock the parts for that record?

    Then also how to unlock if needed?

    Code:
    Private Sub Form_Current()
    
    If Me.Status = "Closed" Then
    Me.AllowEdits = False
    Else
    Me.AllowEdits = True
    End If
    
    End Sub

  5. #20
    Minty is offline VIP
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    The simple way is to lock the whole SubForm Container control;

    Code:
    Private Sub Form_Current()
    
    If Me.Status = "Closed" Then
        Me.AllowEdits = False
        Me.AFRsParts1.Locked = True
    Else
        Me.AllowEdits = True
        Me.AFRsParts1.Locked = False
    End If
    
    End Sub
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  6. #21
    billgyrotech1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2019
    Posts
    179
    Thanks that works locking the record for the form and subform.

    Now I cannot use the search for AFRs and also how to unlock? Maybe code for the "Open" button?

  7. #22
    billgyrotech1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2019
    Posts
    179
    I'm done thanks this is too much trouble.

    Giving up is the only option now because it doesn't seem anyone will help.

    I will keep trying to fix my old version of my database.

    I appreciate your help though Minty but I get the feeling it's because of my rude behavior at first. I understand that people don't forgive.

  8. #23
    Minty is offline VIP
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Quote Originally Posted by billgyrotech1 View Post
    Thanks that works locking the record for the form and subform.

    Now I cannot use the search for AFRs and also how to unlock? Maybe code for the "Open" button?
    I forgot that the setting AllowEdits = False generally stops most form functions from working, as you have discovered
    That's why we tend to loop around individual controls and lock / unlock them.

    If you look at the sample I loaded I thought I had included the lock on the sub form, and looped around the controls as per my original suggestion.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  9. #24
    billgyrotech1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2019
    Posts
    179
    Don't bother Minty you have better things to do.

  10. #25
    billgyrotech1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2019
    Posts
    179
    Here is the latest version of my AFR System.

    Thank you again.

    1) I have in place locking the initial fields when the Tear Down Report is printed but not sure if this only applies to the current record. If not could this be corrected to do so and also gray out the fields showing they are read only?

    2) A way to lock the record including parts when the Status field is "Closed".

    3) A way for the administrator to reopen the AFR by changing the Status field to "Open".

  11. #26
    billgyrotech1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2019
    Posts
    179
    Hello Minty there have been some changes with help from others. Should I post the updated version or would you rather continue from the one I posted previously?

  12. #27
    Minty is offline VIP
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Quote Originally Posted by billgyrotech1 View Post
    Hello Minty there have been some changes with help from others. Should I post the updated version or would you rather continue from the one I posted previously?
    If you have an update I'll have a look at it.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  13. #28
    billgyrotech1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2019
    Posts
    179
    What I am lacking on this version is the Clerk lock fields to be locked and grayed out (your excellent suggestion from earlier) and an Unlock button method.

    Thanks Minty

  14. #29
    billgyrotech1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2019
    Posts
    179
    I have been looking back and it seems there is a tag property that you have made code to lock the Clerk range of fields. I haven't not been successful yet but I will continue to try.

    Thanks Minty for your excellent help

  15. #30
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    for the benefit of responders - cross posted here - https://www.access-programmers.co.uk...d.php?t=305551

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Make Record Read-Only After Update
    By didiomm in forum Programming
    Replies: 5
    Last Post: 09-01-2016, 10:19 AM
  2. Macro to make record read-only
    By Sketchin in forum Forms
    Replies: 1
    Last Post: 02-10-2012, 05:57 PM
  3. Button on a Form to make record read only
    By billgyrotech in forum Forms
    Replies: 8
    Last Post: 08-08-2011, 03:28 PM
  4. Best way to make a query read only?
    By Remster in forum Queries
    Replies: 4
    Last Post: 12-17-2010, 04:36 AM
  5. Replies: 2
    Last Post: 10-19-2006, 04:37 PM

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