Set Global Constant in a Default Value

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.
 
N

Nikos Yannacopoulos

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top