Results 1 to 4 of 4

Thread: How to create access clear button in the form using MS ACCESS

  1. #1
    Join Date
    Nov 2008
    Posts
    88

    How to create access clear button in the form using MS ACCESS

    I wanted to have the clear button option on my web form and the clear button should have the same function as what we see in the calculator or if you are not getting then here is the little description, clear button should clear content displayed on the output so please suggest if anyone aware about this.

    Thanks for your help

  2. #2
    Join Date
    Dec 2008
    Posts
    161

    Re: How to create access clear button in the form using MS ACCESS

    Have you designed your form, if yes then Open your form in design view and ensure the Toolbox is shown. Then Click the Command Button icon. Click somewhere on your form and a new button will appear.The command button wizard will appear - click cancel and close the wizard Right click your new button and select Properties, Select the "Other" column and in the Name row give the button a name that means something to you (like "FieldClear").

  3. #3
    Join Date
    Jan 2009
    Posts
    140

    Re: How to create access clear button in the form using MS ACCESS

    Here is the following code where you need to apply it to your existing code but for that you need to have the proper understanding about the form requirement you are designing.

    Code:
    Clear all the controls in the Form
       For Each ctl In Me.Controls
       For Each ctl In Me.Controls
           Select Case ctl.ControlType
           Case acTextBox, acComboBox, acListBox
               ctl.Value = Null
           Case acCheckBox
               ctl.Value = False
        End Select
    Next ctl

  4. #4
    Join Date
    Oct 2008
    Posts
    167

    Re: How to create access clear button in the form using MS ACCESS

    A form is bound to its RecordSource which may be a table or a query of one or more tables. Where 'box' is the ID attribute of your textbox you want to clear. You should no longer use the global access method to acquire HTML elements. IE, use in document.getElementById('id').value = '';"Another" does not compute in this context.If you only want to use the form for data entry and not for viewing existing data, change the form's DataEntry property from No to Yes.

Similar Threads

  1. Access - form with a dropdown menu
    By Logan 2 in forum Windows Software
    Replies: 5
    Last Post: 21-01-2010, 02:18 PM
  2. How to add browse button to access 2007 form
    By Broot in forum Software Development
    Replies: 3
    Last Post: 31-08-2009, 09:48 AM
  3. How to create button on visual C++ Form
    By Ground 0 in forum Software Development
    Replies: 3
    Last Post: 14-08-2009, 10:26 AM
  4. Access vba code form issue
    By Jaiwanti in forum Software Development
    Replies: 3
    Last Post: 06-07-2009, 12:32 PM
  5. How to connect the web form to Ms Access using ASP.NET?
    By VijayW in forum Software Development
    Replies: 2
    Last Post: 16-02-2009, 09:04 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,710,814,408.52428 seconds with 16 queries