public variable

This is a discussion on "public variable" within the Databases section. This forum, and the thread "public variable are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Databases

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 27th, 2005, 00:58
Junior Member
Join Date: Sep 2005
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
public variable

Hi,

If I set public variable in Modulus, can I access the variable in forms environment?

In modulus environment:

dim run as integer


is it public variable?

Please let me know, thanks.
Reply With Quote

  #2 (permalink)  
Old Sep 27th, 2005, 12:32
New Member
Join Date: Sep 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Public Variables

You need to declare the variable as Global if you want to access the it in a forms module code.

Global Run as Integer

Do this just after the Option Explicit in the module, and outside of any procedure block of code.


I also prefix my global variables so I don't get confused.

Global Glob_Run As Integer
Reply With Quote
Reply

Tags
public, variable

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Safari 3 Public Beta dcpweb Webforumz Cafe 11 Aug 9th, 2007 19:45
Public vs. Private Pages Sulman Website Planning 4 May 25th, 2007 05:32
How to use Public Variable in access forms faizee36 Databases 0 Jan 17th, 2006 08:23


All times are GMT. The time now is 09:39.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43