Dim or Global

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

I have a sequence of 5 forms, I want to pass info from the first form
ending up on the last form gathering another field or 2 as I work my wa
to the last form. I'm transfering the data from the first form to the
second via hidden text boxes, after the info is passed the previous form
is then closed, so on and so forth. I was wondering if I could use Dim
or Global to hold the Info as oposed to my current method. This
database will be used over a network so several parties will be using
the same sequence of events at the same time.
Any help or info appreciated.
Thanks
DS
 
RobFMS said:
My first immediate thought would be to create a table that all 5 forms could
access, even if its a temporary table. This way you do not have to manage
global variables.

Does this seem possible under the situation you have?

HTH

Rob
No, Too much data floating around, It's about 7 fields in total. The
first 4 come from tye first for.
Thanks
DS
 
My next thought might be to create a global array.
Just use the index of the array to store the values you want.

For example:

arrArray(0) - might contain Username
arrArray(1) - might contain Today's date
arrArray(2) - might contain Value from State drop-down
:
:
etc.

HTH

--
FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com

FMS Advanced Systems Group
http://www.fmsasg.com/
 
I was wondering if I could use Dim or Global to hold the Info as oposed to
my current method.

From what you describe, I don't see any reason why you couldn't use a set of
module-level Public variables (aka Global, sort of. Global itself is a bit
archaic). Each user would generate their own set of variables in memory.
Just keep the scope in mind and be careful about any assumptions regarding
the current values of the info based on sequencing & whether you're doing
the sequence for the 1st, 2nd, etc. time. (i.e., be careful about clearing
out "leftover" values from a previous pass, etc.)


HTH,
 
RobFMS said:
My next thought might be to create a global array.
Just use the index of the array to store the values you want.

For example:

arrArray(0) - might contain Username
arrArray(1) - might contain Today's date
arrArray(2) - might contain Value from State drop-down
:
:
etc.

HTH
Thanks
I'll give it a try...
DS
 
George said:
From what you describe, I don't see any reason why you couldn't use a set of
module-level Public variables (aka Global, sort of. Global itself is a bit
archaic). Each user would generate their own set of variables in memory.
Just keep the scope in mind and be careful about any assumptions regarding
the current values of the info based on sequencing & whether you're doing
the sequence for the 1st, 2nd, etc. time. (i.e., be careful about clearing
out "leftover" values from a previous pass, etc.)


HTH,
Thanks
How do you clear out LeftOvers?
DS
 
How do you clear out LeftOvers?
Manually. Some sort of "initialization" routine before you start the
sequence to make sure all the values that you assume are starting as zero
really are zero.

And it might not be necessary, per se. I'm just suggesting great care
regarding value assumptions: make sure you consider all possibilites.

HTH,
 
Back
Top