A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Set Global Constant in a Default Value



 
 
Thread Tools Display Modes
  #1  
Old June 14th, 2004, 04:30 PM
Josue Terrazas
external usenet poster
 
Posts: n/a
Default Set Global Constant in a Default Value

Hi,

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

Any Help Thanks.

  #2  
Old June 15th, 2004, 08:36 AM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default Set Global Constant in a Default Value

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

"Josue Terrazas" wrote in message
...
Hi,

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

Any Help Thanks.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:30 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.