473,386 Members | 1,758 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Intrinsic Constant Definitions

I have finally nagged more work out of the non-profit
organization that I'm trying to do volunteer work for.

The following code begins a tiny form that is part of the project that
I'll be working on.
It uses several VB intrinsic constants whose meaning and significance
I don't know. I couldn't find a list of these constants and their
definitions. Can anyone direct me to one?

If not, will someone please define the ones in this snippet for me?
thanks.

--thelma

Code Snippet:
-------------
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "Form_frmGenerateTables"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Compare Database
Jan 16 '06 #1
8 7414
Thelma Lubkin <th****@alpha2.csd.uwm.edu> wrote in
news:dq**********@uwm.edu:
The following code begins a tiny form that is part of the project
that I'll be working on.
It uses several VB intrinsic constants whose meaning and
significance I don't know. I couldn't find a list of these
constants and their definitions. Can anyone direct me to one?
I don't see any intrinsic constants being used. I see some custom
constants being *defined*, though. Well, not really constants, but
whatever VB means by "Attribute."

How are those used in the code? That would seem to me to illustrate
what they are for.
Code Snippet:
-------------
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "Form_frmGenerateTables"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Compare Database


I assume you recognize that this is VB code, and not VBA code?

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jan 16 '06 #2
David W. Fenton <XX*******@dfenton.com.invalid> wrote:
: Thelma Lubkin <th****@alpha2.csd.uwm.edu> wrote in
: news:dq**********@uwm.edu:

:> The following code begins a tiny form that is part of the project
:> that I'll be working on.
:> It uses several VB intrinsic constants whose meaning and
:> significance I don't know. I couldn't find a list of these
:> constants and their definitions. Can anyone direct me to one?

: I don't see any intrinsic constants being used. I see some custom
: constants being *defined*, though. Well, not really constants, but
: whatever VB means by "Attribute."

Yes, I see that to call them 'intrinsic' to the language would
make no sense, since they're being set by the programmer. I do
assume--I haven't even been able to confirm this through any
documentation--that they are meant to remain constant for the class.
I found the phrase 'intrinsic constant' on the net, but not enough
explanation of its use, so I proceeded to misuse it...

I have been able to find numerous examples of these attributes
being used, but I've completely failed to find any explanations of
their meaning

: How are those used in the code? That would seem to me to illustrate
: what they are for.

They are never used in the code visible to me. I assume that they're
used at a level that is not shown to me, and this perhaps means that
they were created by someone writing code for a module and the system
filling in housekeeping. The snippet I show is the entire code
associated with frmGenerateTables that I've got.

:> Code Snippet:
:> -------------
:> VERSION 1.0 CLASS
:> BEGIN
:> MultiUse = -1 'True
:> END
:> Attribute VB_Name = "Form_frmGenerateTables"
:> Attribute VB_GlobalNameSpace = False
:> Attribute VB_Creatable = True
:> Attribute VB_PredeclaredId = True
:> Attribute VB_Exposed = False
:> Option Compare Database

: I assume you recognize that this is VB code, and not VBA code?

No, I didn't even know that.
--thelma

: --
: David W. Fenton http://www.dfenton.com/
: usenet at dfenton dot com http://www.dfenton.com/DFA/
Jan 17 '06 #3
These attributes are created by VB when the programmer sets various
properties of the form.

You only see these attributes if the (form, in this case) module has been
exported, in Access this happens when the module is saved to a text file
using the SaveAsText command.

If the file is loaded again using the LoadFromText command you will not see
them as they will be incorporated back into the module. If you are seeing
these in the module then I would guess that what has happened here is that
at some time the module has been saved using SaveAsText, the saved file has
been loaded into a text editor an then the whole of the text copied back
into a module in Access.

Of the attributes I recognise
MultiUse = -1 'True
==============
This means that more than one instance of the form can be created

Attribute VB_Name = "Form_frmGenerateTables"
===================================
This is the class name of the form module. The form name would be
frmGenerateTables.

Attribute VB_GlobalNameSpace = False
=============================
Don't know

Attribute VB_Creatable = True
======================
This indicates it is a COM creatable object

Attribute VB_PredeclaredId = True
=============================
Don't know

Attribute VB_Exposed = False
=============================
Indicates whether the COM object is externally creatable. IIRC this cannot
be true for a form (Lyle do you know otherwise ?)
--

Terry Kreft
"Thelma Lubkin" <th****@alpha2.csd.uwm.edu> wrote in message
news:dq**********@uwm.edu...
I have finally nagged more work out of the non-profit
organization that I'm trying to do volunteer work for.

The following code begins a tiny form that is part of the project that
I'll be working on.
It uses several VB intrinsic constants whose meaning and significance
I don't know. I couldn't find a list of these constants and their
definitions. Can anyone direct me to one?

If not, will someone please define the ones in this snippet for me?
thanks.

--thelma

Code Snippet:
-------------
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "Form_frmGenerateTables"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Compare Database

Jan 17 '06 #4
Terry Kreft wrote:
Attribute VB_Exposed = False
=============================
Indicates whether the COM object is externally creatable. IIRC this cannot
be true for a form (Lyle do you know otherwise ?)


My recollection is that it used to be true (in Access97) and I played
with the idea of having common forms (say a personal information form)
across multiple applications but I was unable to make this work
consistently with the coming of AC2K.
SO for AC2K I wrote some code to Save a Form as Text, and to process the
text to do all the combinations of the boolean attribute values possible
and then to save each result as a uniquely named form. One of these
(forget which one) was sometimes visible, create-able, usable; but I
could not find a rule which worked all the time.

BTW, VB 6.0 Programmer's Guide cautions against messing with
VB_PredeclaredID specifically and also says, "In general you should not
edit attributes manually ...."

While VB_Name may not be an internal constant, it is recognized as an
internal something. Try Debug.Print VB_Name. One is not permitted to try
to run this.

--
Lyle Fairfield
Jan 17 '06 #5
Terry Kreft <te*********@mps.co.uk> wrote:
: These attributes are created by VB when the programmer sets various
: properties of the form.

<snip clear, straightforward explanation>

Thank you.

This is !custom! documentation available only in
groups like this one to those of us who are not
active enough practitioners in the 'real world'
to have knowledgeable colleagues or teachers.

--thelma
: Terry Kreft
Jan 17 '06 #6
"Terry Kreft" <te*********@mps.co.uk> wrote in
news:fu********************@karoo.co.uk:
Attribute VB_Exposed = False
=============================
Indicates whether the COM object is externally creatable. IIRC
this cannot be true for a form (Lyle do you know otherwise ?)


I thought MichKa clued us in on the fact that with
SaveAsText/LoadFromText you could change this valuable to make, say,
class modules usable from external databases? Not sure about forms
-- I thought they were already externally available.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jan 17 '06 #7
You can definitely do it with class modules it was forms I was unsure about,
Lyle's replied elsewhere in this thread.

I believe that I was the first person to point this attribute out (but I may
well be wrong about that, other possibilities are Dev or indeed MichKa) but
AFAIK Lyle has done the most with changing these attributes which is why I
addressed my question to him.
--

Terry Kreft
"David W. Fenton" <XX*******@dfenton.com.invalid> wrote in message
news:Xn*********************************@127.0.0.1 ...
"Terry Kreft" <te*********@mps.co.uk> wrote in
news:fu********************@karoo.co.uk:
Attribute VB_Exposed = False
=============================
Indicates whether the COM object is externally creatable. IIRC
this cannot be true for a form (Lyle do you know otherwise ?)


I thought MichKa clued us in on the fact that with
SaveAsText/LoadFromText you could change this valuable to make, say,
class modules usable from external databases? Not sure about forms
-- I thought they were already externally available.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/

Jan 17 '06 #8
Terry Kreft wrote:
I believe that I was the first person to point this attribute out


I think so unless there is something hiding that is earlier than:
http://groups.google.ca/group/comp.d...83b8ae659b90f7

Jan 17 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Scott | last post by:
Hi All, I have the following C code in a header file, outside of any functions: const float X = 50; const float Y = 100 * X; But, when compiling, I get an error: initializer element is...
13
by: Alek Davis | last post by:
Hi, Is it possible to access intrinsic ASP objects, such as Request, from a .NET class. Say, I have a .NET library exposed via a COM or COM+ wrapper. Can this library retrieve the request info...
6
by: cipher | last post by:
I have some constant values in my web service that my client application will require. Having to keep server side and client side definitions insync is tedious. I am trying to do something like...
2
by: Nick Coe \(UK\) | last post by:
Lo each, I want to make a text file containing all of Access intrinsic constant names and their decimal values for A2k to A2k3. Can't say I'm all that keen on typing it out so wonder if...
9
by: Jess | last post by:
Hello, I was told that if I declare a static class constant like this: class A{ static const int x = 10; }; then the above statement is a declaration rather than a definition. As I've...
20
by: karthikbalaguru | last post by:
Hi, String constant being modifiable in C++ but, not modifiable in C. that is, In C++, the following example output will be "Mplusplus" char *str1 = "Cplusplus"; *str1 = 'M'; In C, the above...
18
by: sinbad | last post by:
hi, why does the following program gives an runtime error ,instead of compilation error. anyone please shed some light. thanks sinbad ------------------------------ int main()
7
by: John Koleszar | last post by:
Hi all, I'm porting some code that provides compile-time assertions from one compiler to another and ran across what I believe to be compliant code that won't compile using the new compiler. Not...
7
by: Hendrik Schober | last post by:
Hi, this #include <string> class test { typedef std::string::size_type size_type; static const size_type x = std::string::npos; }; doesn't compile using either VC9 ("expected constant...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.