Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Clear all the fields in a form?

    Hello,

    I have a form with several fields in an Access 2000 based project. I am looking for a command button function which would erase off or clear all the textboxes/selections made in combo boxes and restore to a blank form.

    If anyone has any idea on how to proceed with this, please do let me know.

    Thanks.

  • #2
    New Coder
    Join Date
    Apr 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    dim ctl as control
    
    for each ctl in me.controls
      ctl=vbnullstring
    next
    me is the form. Throw this into the buttons OnClick sub.


  •  

    Posting Permissions

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