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
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").
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
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.