'Previous' and 'back' buttons on user form, overwrite previous form data with 2nd but

  • Hi all


    I have a user form for data entry that I am having a couple of problems with.


    [ATTACH=CONFIG]71488[/ATTACH]



    Please find my Userform document attached on One drive: https://1drv.ms/u/s!Ag-WnkpUjiS9hzFTeCKduoGgyN1b


    Apologies but my spreadsheet will not upload to this forum.

    (Please ignore the V Lookup in the back end).


    Problem 1: Previous and back buttons - overwrite previous form data

    I cannot get the previous and back buttons to work, so that I can go back to previous submitted data (which has been sent to the spreadsheet).


    The idea is that with the back and forward buttons I can make an amendment to a previous submission (which was submitted with the 'ADD RECORD' blue command button), such as a task name, or the numbers of hours the task took and re submit the data (but this time using the 'AMMEND RECORD green command button) to the same rows in the spreadsheet, therefore overwriting the previously submitted information.


    However, I do not want the original time stamp to be overwritten (Timestamp 1 in Column B) - just everything else using the green 'ADD RECORD button'.


    I have already mapped the AMMEND RECORD green command button to timestamp Timestamp 2 to the spreadsheet (in column C), and display itself in the textbook 2 labeled 'Time 2' on the form. However I realise this is not the best way to go about it as I still need to map all the other data to the spreadsheet...and so I've been stuck for a few days now...


    I would really appreciate any help


    Problem 2:

    Can someone provide me the code to clear the data in the form once the data has been submitted through the command button labeled 'ADD record' ?

    I really appreciate this!

  • Re: 'Previous' and 'back' buttons on user form, overwrite previous form data with 2nd


    Your back button clears the form by closing then opening the form. I have added a Function to do this in a cleaner way. You need to call this from the back & forward buttons and reload the data. I'm not sure how your form is finding the current record, your code needs a good sort out, I would actually, re-write it all. Have a look at my DataBaseForm for some ideas.


    Your file is too big to upload. Here's your file with the function added


    I see no point in your splash screen.

  • Re: 'Previous' and 'back' buttons on user form, overwrite previous form data with 2nd


    Quote from royUK;786349

    Your back button clears the form by closing then opening the form. I have added a Function to do this in a cleaner way. You need to call this from the back & forward buttons and reload the data. I'm not sure how your form is finding the current record, your code needs a good sort out, I would actually, re-write it all. Have a look at my DataBaseForm for some ideas.


    Your file is too big to upload. Here's your file with the function added


    I see no point in your splash screen.


    Hi Roy, thank you for your honest thoughts. I am new at this and it has taken me weeks (very little time) to get the form to this point. The splash screen is more impressive than what I have linked to when the company logo is inserted (I had to remove the company logo for confidentiality).


    I will take a look at your site, work on this some more and then most likely bump this thread within the next week.


    Thank you!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!