Access VBA, Referencing Forms
In this article I will explain how you can reference access forms using VBA. For example:
Form_MyTable1.Recalc
Form_MyTable1.Requery
Form_MyTable1.Controls.Item (1)
Form_MyTable1.Width = 45
but before this can be done the
needs to be created. This can be done by following the steps below:Form_MyTable1
Contents
Step 1:
Double click the form on the left sidebar:
Step 2, Select Design View:
Step 3:
On the Design Ribbon click on the View Code button:
Step 4:
By following the steps above a new Class Object will be created:
You will now be able to refer to the form using the
object. For example:Form_MyTable1
Form_MyTable1.Recalc
Form_MyTable1.Requery
Form_MyTable1.Controls.Item (1)
Form_MyTable1.Width = 45
You can download the sample file used in this article from the link below:
If you need assistance with your code, or you are looking for a VBA programmer to hire feel free to contact me. Also please visit my website www.software-solutions-online.com