X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Quick Question Re: Form Modules, Access 2016    
post Dec 28 2017, 10:22 PM

Posts: 15
Joined: 4-December 17

Hi ladies and gents,

I recently bought the book Microsoft Access 2016 Programming Primer by Julitta Korol, and have been working through it steadily over the past few weeks. I've just got a question regarding the validity of a statement the author has made in the opening chapter. She says,

"Each Access form can contain a form module."

Is this correct, or is it more accurate to say that each Access form can contain multiple modules (in the various event procedures of the Properties Sheet)?
Go to the top of the page
post Dec 28 2017, 10:36 PM

Access Wiki and Forums Moderator
Posts: 73,527
Joined: 19-June 07
From: SunnySandyEggo


I think she's correct, but I would probably phrase it more like: "Every Form can have a Class Module."

If it does, the Has Module property will be set to Yes.

Just my 2 cents...
Go to the top of the page
post Dec 29 2017, 08:10 AM

UA Admin
Posts: 33,794
Joined: 20-June 02
From: Newcastle, WA

I agree with theDBguy.

You need to differentiate between a "module" and a "procedure".

Modules are containers in which one or more procedures can be written.

By default, forms are created with modules. These are empty containers until you, the developer add one or more procedures to them. You do this either by selecting one of the events attached to a control, or to the form itself, or by creating subs or functions in the module.

You can remove the module--along with any procedures within it--by toggling the property as theDBguy pointed out. If you change it to No, the module and all of the procedures in it are removed.
Go to the top of the page
post Dec 29 2017, 11:41 AM

Posts: 3,921
Joined: 19-October 10

Its totally correct, all of those event procedures you mention are in the same single module, if they weren't they wouldn't work.

Dbguy is correct aswell as the form module is technically a class module as the form can be used as a class and called multiple times at the same time.
Go to the top of the page

Custom Search
RSSSearch   Top   Lo-Fi    23rd October 2018 - 06:45 AM