user-defined variable

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a string that I use throughout my code in queries, forms etc.:

"X:\Archive\Airport\IMAGES\"

which obviously could change should our IT department decide to rename a
drive or change the subfolder setup. I would like to give my user the ability
to change this folder value, like a DB settings screen of sorts and then use
this value in my code as a variable whenever I need it. Is this possible?

Thanks
Zadok
 
Store the string in a table, and then use a public function to retrieve it
as needed:

Public Function GetArchivePath() As String
GetArchivePath = DLookup("FieldName", "TableName")
End Function
 
I have a string that I use throughout my code in queries, forms etc.:

"X:\Archive\Airport\IMAGES\"

which obviously could change should our IT department decide to rename
a drive or change the subfolder setup. I would like to give my user
the ability to change this folder value,

Use a database property. If you don't want the user to be able to acceess
it, use

CurrentDB.Properties("SecretImagesPath")

If you do want users to be able to access it, then use the custom
properties vis

CurrentDB.Containers("Databases") _
.Documents("UserDefined"). _
.Properties("VisibleImagesPath")

becuase these are echoed in the Access GUI File -> Database Properties ->
Custom.

Hope that helps


Tim F
 
Back
Top