Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Store values in a module

Status
Not open for further replies.

pdeman

Programmer
Feb 17, 2010
39
GB
Hello,

I have the following values currently stored in a Table with others waiting to be added:

Exit Database which is a True/False
Application Name which is a String

But I want to delete the Table and use a different method to store these values. I want them in VBA code say in a Module.

So my question is how can I store them in a Module say as Constants or something and do away with the Table.

Most of them won’t change but the “Exit Database” will need to be changed between True and False triggered from an Event Procedure. For this I currently use a simple Action Query to write the value to the Table.
 
You may play with the Properties collection.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hello PHV,

Could you give me an example of what you had in mind?
 
Thanks MajP,

It looks interesting
Think it's what I was looking for
I will give it a go
Thanks again
 
One thing. Although this still works
Set DB = DBEngine(0)(0)
It is an older form. More common now is
set db = currentdb
 
How are ya pdeman . . .

Same avenue as MajP only have a look at my post here thread702-1236022

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
If you have a frontend/backend solution, I would store this in a frontend table. Also could store the value in the Registry. Really depends on how often you are planning to update it (if many times in the same session, then I wouldn't put it in the Registry).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top