PC Review


Reply
Thread Tools Rate Thread

Determine Module Type

 
 
DevlinM
Guest
Posts: n/a
 
      27th Feb 2010
I want to collect information about each module in my DB. I am using the
AccessObject properties to retrieve dates and so forth. However, using the
property "Type" does not return expected results. All modules return as 5.
I want to distinguish a class module from a standard module. Is this
possible?

Thanks

Devlin
 
Reply With Quote
 
 
 
 
Marshall Barton
Guest
Posts: n/a
 
      27th Feb 2010
DevlinM wrote:

>I want to collect information about each module in my DB. I am using the
>AccessObject properties to retrieve dates and so forth. However, using the
>property "Type" does not return expected results. All modules return as 5.
>I want to distinguish a class module from a standard module. Is this
>possible?


You need to use the module object type property, not the
AccessObject type property.

For Each ao In AllModules
. . .
DoCmd.OpenModule ao.Name
moduletype = Modules(ao.Name).Type
. . .
DoCmd.Close acModule, ao.Name, acSaveNo

--
Marsh
MVP [MS Access]
 
Reply With Quote
 
DevlinM
Guest
Posts: n/a
 
      27th Feb 2010
Thank you for your help!

"Marshall Barton" wrote:

> DevlinM wrote:
>
> >I want to collect information about each module in my DB. I am using the
> >AccessObject properties to retrieve dates and so forth. However, using the
> >property "Type" does not return expected results. All modules return as 5.
> >I want to distinguish a class module from a standard module. Is this
> >possible?

>
> You need to use the module object type property, not the
> AccessObject type property.
>
> For Each ao In AllModules
> . . .
> DoCmd.OpenModule ao.Name
> moduletype = Modules(ao.Name).Type
> . . .
> DoCmd.Close acModule, ao.Name, acSaveNo
>
> --
> Marsh
> MVP [MS Access]
> .
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use Macro (or VBA/Module) To Determine If Runtime Environment Is B genegal Microsoft Access VBA Modules 6 13th Feb 2010 07:16 AM
Determine if particular procedure(s) exist in module XP Microsoft Excel Programming 1 24th Sep 2008 05:35 AM
Dynamiclly Determine Type of Parameter and Type Cast it (code insi =?Utf-8?B?TGVubg==?= Microsoft C# .NET 1 14th Dec 2005 09:24 PM
How do I determine the module line number in error =?Utf-8?B?Q2hyaXM=?= Microsoft Access VBA Modules 2 6th Sep 2005 04:29 PM
How to determine module dependency Greg Johnston Microsoft Access 1 11th Mar 2005 05:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:54 PM.