A good way to get into VBA is to create some function buttons and then edit the code created by the button wizard.
For example you could create 4 buttons, 1 to open a form, 2 to run a query, 3 to close the form, 4 to refresh the data.
Then copy all the code from the 2,3,and 4 buttons and add...