Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2007
    Posts
    8

    Unanswered: How do I add a reset button?

    I have created a page which captures the data in tables. My page has Name, Address, etc. I want a button on my page that when you click on it, if a user fills out all their details but has made a lot of mistakes... instead of going into name, address, and so on and clicking on the backspace button, I want a button that just resets everything.

    Hope this makes sense.

    Can anyone help?

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Are you using bound or unbound forms?
    Code:
    'For bound forms BEFORE submition
    DoCmd.RunCommand acCmdUndo
    
    'For unbound forms simply clear the textbox controls
    Dim ctl As Control
    
    For Each ctl In Me.Controls
        If ctl.ControlType = acTextBox Then
            ctl.value = ""
        End If
    Next ctl
    George
    Home | Blog

  3. #3
    Join Date
    Oct 2007
    Posts
    8
    I don't understand... Sorry I'm a newbie...
    What's bound and unbound?

  4. #4
    Join Date
    Nov 2003
    Location
    Sussex, England
    Posts
    404
    Unbound - not directly linked to a data field on a table
    Bound - when you enter a value and move the cursor to another field the data is entered. Resetting these fields to " " might not be a practical solution.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •