Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / September 2006

Tip: Looking for answers? Try searching our database.

Global variants

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sueprnaut - 29 Sep 2006 11:38 GMT
Hi,
I need a little help. I have two procedures in my code:

Private Sub Form_Open(Cancel As Integer)
....
Dim Arr() As Variant
....
End Sub

Private Sub Form_Close()
....
End Sub

In the first procedure I create and populate an array. How can I use this
array in the Form_Close procedure? Is there a way to define global variants?
Stefan Hoffmann - 29 Sep 2006 11:49 GMT
hi,

> In the first procedure I create and populate an array. How can I use this
> array in the Form_Close procedure? Is there a way to define global variants?
Declare your array at the beginning of the form module as

Private m_Arr() As Variant

mfG
--> stefan <--
Klatuu - 29 Sep 2006 16:52 GMT
Do the Dim at the module level, that is right after the Options statements in
the Form module.  That way it is visible to all procedures in the module.

> Hi,
> I need a little help. I have two procedures in my code:
[quoted text clipped - 11 lines]
> In the first procedure I create and populate an array. How can I use this
> array in the Form_Close procedure? Is there a way to define global variants?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.