I am new to MS Access and would like to work with buttons of a form. I wanted to understand a point
I have a text box search and I have a button in the form
I don't want to use VBA and with the help of Expression Builder can I clear the Text in Text Box search after clicking the button?
I have tried and it isn't working out. Is it the right way ?
CodePudding user response:
Not sure why you want to use Expression Builder. A simple macro will do the trick.
Select Properties
of Command Button, under Events
choose ...
next to On Click
and then Macro Builder
Add Action, choose your TextBox control name, select Set Property
, then Value
- and leave Value blank
Save and Exit and Run
CodePudding user response:
With expression builder you can only call a user function, macro or vba routine. Try with vba code:
Me.controlName.value = ""
Me is your form.
controlName is the name of your field (in my Screenshot is "txt_somefield")
Click on button, Event, Onclick and put this code (remember to replace your field's name).