Holding Variable

  • Thread starter Thread starter Bryan Hughes
  • Start date Start date
B

Bryan Hughes

Hello,

What is the best way to hold a String variable value through multiple forms
and modules?

-TFTH
Bryan
 
One method (maybe not the best) is to have a hidden form open with the
string value in a text box.
 
Duane,

I am currently using a temp table to hold data for a selected case file (id,
name, date, etc.) this table is cleaned an reloaded after user selects a
different case file.

What would be the best method?

I want to cut down on bloat, but still need to access this from several
different areas, what would you suggest?
 
I want to cut down on bloat, but still need to access this from several
different areas, what would you suggest?

An alternative is the datbase DAO properties: you can use the simple

Set db = CurrentDb()
db.Properties("CaseFileName").Value = "Eric"

but using the UserDefined document in the Databases container has the
advantage that you can edit/ delete/ debug it using the Access GUI --
it's the same as the ones you see with File | Database Properties |
Custom

The syntax is still fairly easy:

With db.Containers("Databases").Documents("UserDefined")
.Properties("CaseFileName") = "Samantha"
Debug.Print .Properties("CaseDate").Value = Date()

End With

HTH


Tim F
 
You could create a class with a property that will hold the string value or
create a public variable.
 
Tim Ferguson said:
An alternative is the datbase DAO properties: you can use the simple

Set db = CurrentDb()
db.Properties("CaseFileName").Value = "Eric"

but using the UserDefined document in the Databases container has the
advantage that you can edit/ delete/ debug it using the Access GUI --
it's the same as the ones you see with File | Database Properties |
Custom

The syntax is still fairly easy:

With db.Containers("Databases").Documents("UserDefined")
.Properties("CaseFileName") = "Samantha"
Debug.Print .Properties("CaseDate").Value = Date()

End With

HTH


Tim F
 
Tim Ferguson said:
An alternative is the datbase DAO properties: you can use the simple

Set db = CurrentDb()
db.Properties("CaseFileName").Value = "Eric"

but using the UserDefined document in the Databases container has the
advantage that you can edit/ delete/ debug it using the Access GUI --
it's the same as the ones you see with File | Database Properties |
Custom

The syntax is still fairly easy:

With db.Containers("Databases").Documents("UserDefined")
.Properties("CaseFileName") = "Samantha"
Debug.Print .Properties("CaseDate").Value = Date()

End With

HTH


Tim F
 
Tim Ferguson said:
An alternative is the datbase DAO properties: you can use the simple

Set db = CurrentDb()
db.Properties("CaseFileName").Value = "Eric"

but using the UserDefined document in the Databases container has the
advantage that you can edit/ delete/ debug it using the Access GUI --
it's the same as the ones you see with File | Database Properties |
Custom

The syntax is still fairly easy:

With db.Containers("Databases").Documents("UserDefined")
.Properties("CaseFileName") = "Samantha"
Debug.Print .Properties("CaseDate").Value = Date()

End With

HTH


Tim F
 
Back
Top