Module Objects in Project Explorer in Microsoft Access

Ask us a question on-line
or get our email address on scr.im

Access Programmers has a mission to help people improve productivity through the effective use of technology.

 

 

Microsoft Certified Partner

  

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.

set has module property

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.

set has module property for report

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’.

choose the code builder

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.