Results 1 to 9 of 9
  1. #1
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117

    Revision Control for Forms

    I don't know if this is possible,

    I have been searching online and can't find a solution but how would I go about keeping changes to a form and then having an update form. My boss wants me to add a field to a form and it will be auto generated a letter or number such as "A" or "1". Then if lets say the form changes because the user wants to change something, for example its now an estimate for a request when before it wasn't, so the user changes the form to not an estimate, then the field on the form goes to "2" or "B" and saves it as a new record. So now people viewing can review the old form and the new form with changes made linked to the same id and see the changes made on the new form while having the old form as well.



    Thanks, all help is appreciated!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,643
    It sounds like you want to track changes to the data, not changes to the form, correct? The term to search for is "audit trail", or that should at least get you started. The two most common methods use either a memo field in the table being audited or a separate table. That table would contain (at the least) fields for the field being changed, the old value and the new value. I have heard of people saving copies of entire records, but I think it's unusual.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    I think you are confusing changes to the form design with changes to the data the form displays. Yes, labels, prompts and other information of the form can be dynamically changed, but they are not saved.

    My boss wants me to add a field to a form and it will be auto generated a letter or number such as "A" or "1".
    What do you mean by a "field" here? Are you talking about a textbox, or some other king of control? If you mean a textbox, then when you change it to a value, you are not changing the form, you are changing the data.

    Can you clarify, please?

  4. #4
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117
    Yes a textbox on the form, so when user makes a change on the original form, it goes from 1 to 2 and if they make another one it goes to 3 and so on, so when people look at the form, they can see this is the third revision and then can see what the form was before on 2. Usually when a user makes a change you can not see the old data, so I am just looking for a way to track the changes on the form to look at the old history of the form and seeing what new is on the form

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,643
    See post 2. You are describing changes to data. That data is displayed on a form, but stored in a table.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117
    Ok guys, I talked to my boss and now he is saying something not this complicated. He wants the user to make a copy of the form and just able to increment the form id by 1, so it is saved as a new record with all the other information. How can I implement a function that will allow the user to make a copy of the form and then switch the ID. I don't know if this is possible either but it is a much simpler situation.

    Thanks,
    Banpreet

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850
    ???Please give us an example of what you (and you boss) are trying to describe.

    he is saying something not this complicated.
    As others have said, it seems you are changing data, but your post keeps referring to changing/copying/creating a form.

    We need an explicit statement of requirements and example.

  8. #8
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117
    Ok, I have a form, it has an master id, then parent id, which all these ids will be linked to the master id. Then on the form I will have these two ids, and then I want to have another auto number field for revisions. Then the rest of the form the user fills out. It goes through an approval process, then after it gets approved, there might be some changes to the form. So my boss wants the user to have a button or something on their form that they can click which will allow them to make a copy of their form, with the same master id, and all they have to do is switch the information they need to change, it could be one field or two, but on the form they can then switch the parent id and revision field to increment to the next number, then they sumbit their form again then it goes through the same process again, till it gets approved. Hope this is clear!

  9. #9
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,511
    Maybe this method. Put button on form called Change Record or something. In the OnClick code, copy the current data fields to temp variables, initiate a new record, paste the values back into the fields of the new record, then Setfocus to the first field for them to make any changes.

    Dim vField1, vField2, vField3 As Variant
    Dim vRecNbr as Number

    vField1 = Me.Field1
    vField2 = Me.Fields
    vRecNbr = me.RecNbr

    DoCmd.GoToRecord , , acNewRec

    Me.Field1 = vField1
    Me.Field2 = vField2
    Me.RecNbr = vRecNbr + 1

    Me.Field1.SetFocus

    You probably want to sort the data on this form on RecNbr Descending to your most current record is first.

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

Similar Threads

  1. Revision History for Forms
    By banpreet in forum Forms
    Replies: 4
    Last Post: 08-16-2016, 09:54 AM
  2. Reports - filtering revision fields
    By Nubia in forum General Chat
    Replies: 1
    Last Post: 03-06-2015, 09:46 AM
  3. Replies: 5
    Last Post: 01-16-2013, 03:48 PM
  4. Replies: 18
    Last Post: 08-22-2010, 05:22 AM
  5. Selecting Most Current 'Revision'
    By Nola_Gal in forum Queries
    Replies: 5
    Last Post: 05-29-2010, 12:48 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