Results 1 to 6 of 6
  1. #1
    s.carter is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2015
    Posts
    7

    Clearing Form Data

    I have 4 unbound items on a form (2 combo boxes and 2 text boxes). Once you do a search and all 4 boxes are populated, you can do another search but if the user is distracted and forgets to select the second dropdown they will be looking at the wrong information in text boxes 3 and 4.
    I googled "clear all" and "new search" but all the explanations were rather confusing. I saw a video using the button control and the undo feature to clear a form - when I tried it it said it was unavailable.


    Any ideas?

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Not sure how the User is creating the issue. In other words, you will need to find the correct event handler to place your code. Otherwise, the undesirable results will persist. Aside from that, you can clear the value of a combo using

    Me.ComboName.Value = ""

  3. #3
    s.carter is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2015
    Posts
    7
    Can you tell me more? I've tried that code on On Click, On Change and Before Update and it gives me errors.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Here is an example. The reset is in the Code-Behind the button click event.
    Attached Files Attached Files

  5. #5
    s.carter is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2015
    Posts
    7
    Thank you. This is perfect!

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    OK, post up if you get stuck again.

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

Similar Threads

  1. Clearing Sub Form
    By eagle670 in forum Forms
    Replies: 19
    Last Post: 06-23-2014, 02:31 PM
  2. acViewPreview clearing form of data in textboxes
    By Markb384 in forum Programming
    Replies: 9
    Last Post: 03-07-2014, 10:06 AM
  3. Replies: 7
    Last Post: 07-07-2013, 11:11 AM
  4. Replies: 4
    Last Post: 01-04-2013, 04:03 PM
  5. clearing a form
    By macsterling in forum Forms
    Replies: 0
    Last Post: 07-31-2008, 10:38 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