"YourAppendQuery"
The name of the query you want to run. Or alterantively a SQL string.
execute
Execute (run) the query against the database...
currentdb
You can open a connection to any database you like. Currentdb is an easy way of referring to the database file currently open in Access.
So, the code says “execute this query (or sql statement) against the database open in Access.”
Forms, reports, databases, controls are objects. When something happens to an object (it is opened, closed, clicked, etc) it is known as an event.
You can add code to events to make something else happen.
You said you want to run the query every time you open a particular form.
So you would put the code in the form code module's open event.
In the module you should see two dropdown boxes above the code.
The left one lets you select an object (in this case "Form") and the other lets you select the available events that you can capture.
Private Sub Form_Open(Cancel As Integer)
CurrentDb.Execute "delete * from table1"
End Sub