473,585 Members | 2,512 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access Custom property vs. Global Variable

I'm using Access 2K. I'm hoping someone can tell me which method
performs faster- (currently I'm using a mix of both methods)

a.) creating custom properties and then calling functions to set and
retrieve the values... (ie:
application.cur rentproject.pro perties(propNam e))

b.) creating global variables in the form of an array and using a
function to populate and retrieve them.

I set string, numeric and boolean values based on the user selected
from a sign-in form and call these values frequently throughout the
application.

Thanks,
lq

Nov 13 '05 #1
19 4161
Use a global variable if you just need a temporary memory assignment that's
available to all routines. It will be faster - particularly for assigning a
value).

Use a custom property if you want something that survives between sessions.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps.org.

"laurenq uantrell" <la************ *@hotmail.com> wrote in message
news:11******** **************@ c13g2000cwb.goo glegroups.com.. .
I'm using Access 2K. I'm hoping someone can tell me which method
performs faster- (currently I'm using a mix of both methods)

a.) creating custom properties and then calling functions to set and
retrieve the values... (ie:
application.cur rentproject.pro perties(propNam e))

b.) creating global variables in the form of an array and using a
function to populate and retrieve them.

I set string, numeric and boolean values based on the user selected
from a sign-in form and call these values frequently throughout the
application.

Thanks,
lq

Nov 13 '05 #2
Allen thanks.
What I am trying to determine if there is an overhead associated with
having say 20 custom properties in the application, and if so, is it
worse than having to load 20 global values in an array from a remote
server.
lq

Allen Browne wrote:
Use a global variable if you just need a temporary memory assignment that's available to all routines. It will be faster - particularly for assigning a value).

Use a custom property if you want something that survives between sessions.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps.org.

"laurenq uantrell" <la************ *@hotmail.com> wrote in message
news:11******** **************@ c13g2000cwb.goo glegroups.com.. .
I'm using Access 2K. I'm hoping someone can tell me which method
performs faster- (currently I'm using a mix of both methods)

a.) creating custom properties and then calling functions to set and retrieve the values... (ie:
application.cur rentproject.pro perties(propNam e))

b.) creating global variables in the form of an array and using a
function to populate and retrieve them.

I set string, numeric and boolean values based on the user selected
from a sign-in form and call these values frequently throughout the
application.

Thanks,
lq


Nov 13 '05 #3
Assigning a value to a property will be slower than assigning a value to a
variable.

Will your code need to check whether the property already exists, and create
it if it does not? There's extra overhead in that also.

The difference may be academic for just 20 values, unless you are setting
them repeatedly.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps.org.

"laurenq uantrell" <la************ *@hotmail.com> wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.com...
Allen thanks.
What I am trying to determine if there is an overhead associated with
having say 20 custom properties in the application, and if so, is it
worse than having to load 20 global values in an array from a remote
server.
lq

Allen Browne wrote:
Use a global variable if you just need a temporary memory assignment

that's
available to all routines. It will be faster - particularly for

assigning a
value).

Use a custom property if you want something that survives between

sessions.

"laurenq uantrell" <la************ *@hotmail.com> wrote in message
news:11******** **************@ c13g2000cwb.goo glegroups.com.. .
> I'm using Access 2K. I'm hoping someone can tell me which method
> performs faster- (currently I'm using a mix of both methods)
>
> a.) creating custom properties and then calling functions to set and > retrieve the values... (ie:
> application.cur rentproject.pro perties(propNam e))
>
> b.) creating global variables in the form of an array and using a
> function to populate and retrieve them.
>
> I set string, numeric and boolean values based on the user selected
> from a sign-in form and call these values frequently throughout the
> application.
>
> Thanks,
> lq
>

Nov 13 '05 #4
rkc
laurenq uantrell wrote:
Allen thanks.
What I am trying to determine if there is an overhead associated with
having say 20 custom properties in the application, and if so, is it
worse than having to load 20 global values in an array from a remote
server.
lq


Run some tests.

If the values are specific enough to each front end so that you can
store them as properties, why not use a local table.
Nov 13 '05 #5
Allen,
What I am doing is storing some user preferences specific to individual
forms, for example, if the user has selected certain checkboxes.
In the past I have sent this info to a SQL table on the server, but
many users are connected by VPN and this seems like a lot of traffic
for nothing, if I can store it in the Access application as custom
properties and make it transfer between sessions.
As always, thanks for your input.
lq

Allen Browne wrote:
Assigning a value to a property will be slower than assigning a value to a variable.

Will your code need to check whether the property already exists, and create it if it does not? There's extra overhead in that also.

The difference may be academic for just 20 values, unless you are setting them repeatedly.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps.org.

"laurenq uantrell" <la************ *@hotmail.com> wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.com...
Allen thanks.
What I am trying to determine if there is an overhead associated with having say 20 custom properties in the application, and if so, is it worse than having to load 20 global values in an array from a remote server.
lq

Allen Browne wrote:
Use a global variable if you just need a temporary memory assignment
that's
available to all routines. It will be faster - particularly for

assigning a
value).

Use a custom property if you want something that survives between

sessions.

"laurenq uantrell" <la************ *@hotmail.com> wrote in message
news:11******** **************@ c13g2000cwb.goo glegroups.com.. .
> I'm using Access 2K. I'm hoping someone can tell me which method
> performs faster- (currently I'm using a mix of both methods)
>
> a.) creating custom properties and then calling functions to set

and
> retrieve the values... (ie:
> application.cur rentproject.pro perties(propNam e))
>
> b.) creating global variables in the form of an array and using

a > function to populate and retrieve them.
>
> I set string, numeric and boolean values based on the user selected > from a sign-in form and call these values frequently throughout the > application.
>
> Thanks,
> lq
>


Nov 13 '05 #6
It's an Access project (adp) with a SQL server backend, that's my I'm
not using a local table.

Nov 13 '05 #7
rkc
laurenq uantrell wrote:
It's an Access project (adp) with a SQL server backend, that's my I'm
not using a local table.


If which will load faster is really the deciding criteria, run some
tests. Personally, I'd keep the clutter of local preferences out of the
back end no matter which way loaded a milli-second faster.

A plain old text file on the local machine is another option.
Nov 13 '05 #8
You do bring up another option with the local text file, so having
these three options (plus I add a fourth):

1.) Global Variable - written and read with a stored procedure from a
remote SQL server, in many cases over a slow VPN.
2.) Custom Properties
3.) A local text file
4.) Registry settings

Which is the best option as far as performance, considering these
values have to be read each time certain forms open and written every
time a user changes a preference setting on a form...

lq

rkc wrote:
laurenq uantrell wrote:
It's an Access project (adp) with a SQL server backend, that's my I'm not using a local table.
If which will load faster is really the deciding criteria, run some
tests. Personally, I'd keep the clutter of local preferences out of

the back end no matter which way loaded a milli-second faster.

A plain old text file on the local machine is another option.


Nov 13 '05 #9
You do bring up another option with the local text file, so having
these three options (plus I add a fourth):

1.) Global Variable - written and read with a stored procedure from a
remote SQL server, in many cases over a slow VPN.
2.) Custom Properties
3.) A local text file
4.) Registry settings

Which is the best option as far as performance, considering these
values have to be read each time certain forms open and written every
time a user changes a preference setting on a form...

lq

rkc wrote:
laurenq uantrell wrote:
It's an Access project (adp) with a SQL server backend, that's my I'm not using a local table.
If which will load faster is really the deciding criteria, run some
tests. Personally, I'd keep the clutter of local preferences out of

the back end no matter which way loaded a milli-second faster.

A plain old text file on the local machine is another option.


Nov 13 '05 #10

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

Similar topics

3
3227
by: amywolfie | last post by:
Hi all: I develop in both FileMaker Pro and Access. FileMaker has a global field type, whereby the value of the gfield is the same for all records. Is there an equivalent in MS Access (2002)? I don't want to set a variable in VB, since the value of the global will change and requires input from the user.
8
2448
by: Mike Turco | last post by:
This is a strange one. I have an app that needs to know who is using the program but there's no need for security. When the program opens a form comes up with a listbox. The user double-clicks his name, the data is stuffed into a variable that is dimmed in a module, and the user is "logged in". From time to time, though, Access forgets...
3
2965
by: Steve Franks | last post by:
Is there a way I can extend the HttpContext or one of its subclasses to include a property that exposes a custom class of mine to all ASP.NET pages? More specifically, I'd like to use a HttpModule to initialize an instance of a custom class, and have this class exposed directly through the HttpRequest for the current user through a property...
4
2003
by: lars.uffmann | last post by:
Hey everyone! I am (still) working on a project that I took over from former students, so don't blame me for the criminal approach on coding *g* The problem I have is fairly easy and while I have solutions, none of them seems really "clean" to me and I was wondering if someone here maybe had a better idea: class geometry { ... }
3
1755
by: | last post by:
Hi all, I have a question on reflection Lets say I have a custom object called Address. Now, lets say I have a string variable that holds the name of a variable in the object such as "State.StateCode". How can I reflect upon the Address object so as to echo the value contained in the string variable. Something like:- Dim add as new...
1
6313
by: Stu | last post by:
Hi, Im using vis studio 2003 and I think wse is out of the question as clients could be using java which doesnt support it. So I managed to find some code which allows you to develop a custom soap header called by using a http module. The problem Im having is I cannot seem to get the event to raise to fire off my authenticate method in the...
2
2288
by: TD | last post by:
I've read several posts here that say global variables are reset whenever an unhandled error occurs. I want to use a custom form property instead of a global variable to store a boolean value. My question is does a custom form property get reset also? Was also wondering if there is any reason one would ever use a global variable since the...
1
3104
by: gm | last post by:
Hi; I have written a database that tracks all the installation we have ever done. I have a small heating company. I have recently started keeping a directory of digital photographs of the completed job. I can create a hyperlink button that will link to a photgraph, but I cannot link to a specific photo of that specific job. Each job has its'...
2
19443
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge. I would be using layman's...
0
7908
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7836
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8199
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8336
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7950
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6606
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5389
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1447
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1175
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.