Set Global Constant in a Default Value

  • Thread starter Thread starter Josue Terrazas
  • Start date Start date
J

Josue Terrazas

Hi,

I'm trying to set a Default Value in a Text Field from a
Global Constant in my DB.

Any Help Thanks.
 
Josue,

Assuming your constant is called MyConstant, make a simple function in a
general module like:

Function Get_MyConstant()
Get_MyConstant = MyConstant
End Function

This function will return the value of MyConstant. Now in your form design,
set the Default Value property of the text box (or is it in a table design?
same thing...) to:

=Get_MyConstant()

HTH,
Nikos
 
Back
Top