Access clear a text box
Solved
yoell
Posted messages
19
Status
Member
-
jason -
jason -
Hello,
On Access, I'm looking to create the following event: "when I click a button in a form, a text box clears elsewhere"
This text box having been filled in beforehand.
Is this possible on Access 2003?
On Access, I'm looking to create the following event: "when I click a button in a form, a text box clears elsewhere"
This text box having been filled in beforehand.
Is this possible on Access 2003?
Configuration: Windows XP Internet Explorer 7.0
2 answers
-
Hi, yes it's definitely possible.
Switch to creation mode in your form, then right-click on the button and select properties.
Then, in the events tab, on the "on click" event choose "code generator."
For the next steps, we will assume that the textbox to be cleared is called "texte0".
You need to put this in the procedure, where the cursor is located:
Private Sub Commande0_Click() Me.Texte0 = "" End sub
The codes "Private Sub Commande0_Click()" and "End Sub" are usually already written. -
You're welcome, indeed, we can do a lot of things with VBA, and sometimes it's actually quite simple.
Anyway, if you have any other questions, feel free to ask.