I use forms for users to interact with. I also use VBA to do 'things' in response to Events created by the user. So, for instance, I might have a button on a form that when clicked, executes some code to export data.
Here is an example of code that would export data
https://www.accessforums.net/program...cel-54133.html
You can create an Event Handler while in Design View of a form. After you add a Command Button to a form you can go to the Command Button's properties via the Properties Sheet. Within the Properties Sheet is a tab named Events. Under the Events tab is an event named On Click. there is an ellipses(...) to the right of each event. Clicking the ellipses and selecting code builder will open the VBA editor and place your cursor where your code belongs. The cursur will be in the middle of your new Click Event procedure.