Objects in Project Explorer

You might assume that all of the Forms, Reports, and Modules that you create will automatically appear in the Project Explorer. However, this is not true. The VBA environment will only know about the objects if you tag them as "having a module".

By default, all Modules will appear in the Project Explorer, but not all Forms and Reports necessarily will.

A Form will only appear in the Project Explorer if the Form's "Has Module" property is set to "Yes". Refer to the example below.

undefined

In addition, a Report will only appear in the Project Explorer if the Report's "Has Module" property is set to "Yes". Refer to the example below.

undefined

It is important to note that whenever you invoke the Code Builder in a Form/Report, Access will automatically set the Form/Report’s ‘Has Module’ property to ‘Yes’.

undefined

If you want to reference one or more of your Forms or Reports in the VBA environment, you may need to manually go to the Form/Report's Properties window and set the "Has Module" property to "Yes" as in the example above.


By Admin at 6 Sep 2016, 13:06 PM

Comments

 

Post a comment

Please correct the following: