View Full Version : public variables - where to declare?


qwertyjjj
10-31-2007, 01:55 AM
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?

KenHigg
10-31-2007, 02:33 AM
No.

:)
ken

qwertyjjj
10-31-2007, 02:51 AM
where then ?

qwertyjjj
10-31-2007, 03:01 AM
found it:
http://www.blueclaw-db.com/access_database_global_variable.htm

KenHigg
10-31-2007, 03:25 AM
Another thing you can do is put this in a database property and this way you can get to it from outside the database.

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