Open Blank Form When Database is Opened, Access VBA
Previously in the article Open Form When Database is Opened, Access I’ve explained how you can cause a form to appear every time the an Access file is opened. By default the form will be displaying the first record in the table:
In this article I will explain how you can cause a blank form to appear rather than a form with data from the first record.
Open the form in design view:
If there are multiple classes on the left click on the forms class. It will have a name in the format:
where “FormName” is the name of the form, which in our case is “Form1”.
Write the following code inside the Form_Form1 class:
You can download the sample file and code used in this article from the link below:
- Open Form When Database is Opened, Access
- Access Create Popup Form
- Access Startup Form
- Guide to docmd.openform