Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date problem

Status
Not open for further replies.

yellowke

Programmer
Nov 5, 2002
48
BE
hi,

I want to set a default value in a field of a table.
This field should contain the first day of the month we're in at the moment.

eg: today it's 15/01/2003 so in the field should come 01/01/2003. (I use dd/mm/yyyy)

It's probably very simple but I can't find it.

Tnx guy's
 
yellowke

SET DATE DMY
SET CENTURY ON
?"01"+ SUBSTR(DTOC(DATE()),3,8)
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hi
In the Value colun of the TextBox field.. put the code..

=DATE()-DAY(DATE())+1

If you simply enter.. DATE()-DAY(DATE())+1 without the = sign in front in the Value property.. the text entered will appear as your textbox character type value. When you add the = sign in front, it will be evaluated as an expression. So take care to enter exactly as above.

The value entered will be the default value when you start the form. :)
ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top