Results 1 to 5 of 5
  1. #1
    tekerin is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2013
    Posts
    7

    Deleting of one field the second data for another field is updated in forms

    Hello,

    I have a form that is linked to a table. Example:
    <Customer Name>
    <ID>
    <Approval Button>
    <Approval Status>


    Currently, the <Approval Button> (noted as AppBtn below) is only shown when the person loading access has a logon ID that matches the "Developer" status. This has been defined in separate module and is working properly. This was added so that when records are added, it's only live when a "Developer" checks off the approval button, and "Developer" status is dependent on logon ID to the terminal.

    What I am trying to do, and stuck on, is that once a Developer approves the entry through checking the approval button, any user has the ability to change the data, and the updated entry does not need to be re-approved. What do I need to do to say if the data in <Customer Name>, <ID> was changed, then the <Approval Status> will become null again?

    Thanks



    --- Code used to "hide" the Approval Button----
    Private Sub Form_Load()
    Me.AppBtn.Visible = False
    If Developer = True Then
    Me.AppBtn.Visible = True
    End If
    End Sub
    -----------------------------------------------

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Want the approval button only if the form is on a new record? Or only when Approval Status is null? In any case, only when the user is Developer?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    tekerin is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2013
    Posts
    7
    I currently have the approval button for all records which I think would work because it allows the developer to uncheck any records in the future if choose to. An example of what I am trying to do right now:

    <customer name> = tekerin, <id> = tek, <approval btn> - only June7 can access, and was checked off by June7, in access table, this field would then show as "-1" as it's linked to a checkbox, <approval status> = yes, this status is basically linked to <approval btn>, and if the value = -1, then it will read yes, otherwise no

    all this above is working fine so far, but i was hoping to add an extra layer of security where <customer name> or <id> if any parts of it was updated, even adding a space or deleting a letter, it would automatically trigger <approval btn> to be 0, or null again, and of course <approval status> would also resulting in being updated.

    thanks again

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Maybe use the BeforeUpdate event of control or form.

    Code in the Load event could simply be:

    Me.AppBtn.Visible = Me.Developer = True
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    tekerin is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2013
    Posts
    7
    Woah, you are a genius and life saver! I added this to the critical fields that I wanted reaprpovals when values are updated and it's working now.

    Private Sub Customer_Name_AfterUpdate()
    AppBtn = 0

    End Sub

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

Similar Threads

  1. Date field updated when box checked
    By Sienna in forum Forms
    Replies: 6
    Last Post: 03-06-2014, 11:57 AM
  2. Replies: 2
    Last Post: 10-26-2013, 11:31 AM
  3. Replies: 2
    Last Post: 02-12-2013, 12:32 AM
  4. Replies: 2
    Last Post: 12-29-2012, 01:26 PM
  5. Deleting values after a field is updated
    By mwhcrew in forum Forms
    Replies: 3
    Last Post: 08-16-2010, 02:52 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