public variables - where to declare?

qwertyjjj

Registered User.
Local time
Today, 13:37
Joined
Aug 8, 2006
Messages
262
As I understand it the best place to declare some public variables is in a new module.
I can then put in stuff like Public Const strVersionNumber = "v1.0.0"

Do I then have to call the module as the startup code?
 
where then ?
 
Another thing you can do is put this in a database property and this way you can get to it from outside the database.

Code:
Dim db As DAO.Database
Dim prp As Property

Set db = CurrentDb()

Set prp = db.CreateProperty("MYVersion", dbText, "V1.1")

db.Properties.Append prp

MsgBox CurrentDb.Properties!MyVersion

:)
ken
 

Users who are viewing this thread

Back
Top Bottom