Type - End Type

J

John

I am trying to use the Type / End type to define a set of data. It looks
like it will fit my needs exactly,

Private Type ACTIVITY
Job as String * 4
Phase as String * 2
ActID as String * 10

etc.

End Type


When I try to compile the code I get the following error:

===================
Compile error:

Invalid inside procedure

===================

I am doing this in a Module. Do I have to move it somewhere else? In
reading the help file it indicates that a module can read it, but there is
another line that seems to indicate that they can't be defined in a module.
 
V

vanderghast

You have to place that definition in the declaration section (after the
Option Explicit and other options, and before the module defines any
procedures).

Vanderghast, Access MVP
 
J

John

That did the trick - if I had just clicked the underlined "Module Level" in
the help file it would have helped...

--
Thanks in advance!
**John**


vanderghast said:
You have to place that definition in the declaration section (after the
Option Explicit and other options, and before the module defines any
procedures).

Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top