• ReInput on the form

    • This topic has 2 replies, 3 voices, and was last updated 16 years ago.
    Author
    Topic
    #458670

    Hi,

    I would like to have a button call “ReInput” on the form to let user to delete all current data fields on the form, then user can reinput if they want. However, I couldn’t find a best codes to give to me what I want.

    Thanks in advance.

    Regards,

    Viewing 1 reply thread
    Author
    Replies
    • #1154062

      If I understand correctly your question, you should have two buttons. One to store all the data from the form and delete the record. he other button would be used to re-input the data on a existing or new form.
      Is it that what you want ?
      If yes, then use code for button 1 like this :
      MyVariable1 = Me.Textbox1
      MyVariable2 = Me.Textbox2
      MyVariable3 = Me.Textbox3

      DoCmd.RunCommand acCmdDeleteRecord

      and for button 2
      Me.textbox1 = MyVariable1
      Me.textbox2 = MyVariable2
      Me.textbox3 = MyVariable3

      Variables should be declared at the top of the code so you can use them in both sub’s.

    • #1154108

      Hi,

      I would like to have a button call “ReInput” on the form to let user to delete all current data fields on the form, then user can reinput if they want. However, I couldn’t find a best codes to give to me what I want.

      Thanks in advance.

      Regards,

      Is the form bound to a table or query?
      If so why not just execute:
      Me.UnDo
      this clears all the fields on the form.

    Viewing 1 reply thread
    Reply To: ReInput on the form

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: