Edit Date Field on a form

S

SR

I want to display current date when I open up a form. The date field should
be such that I can edit it to some other date, if required. On editing, the
new date should be stored in the database.
Pls reply asap.
Thanx in advance.
 
R

Rick Brandt

SR said:
I want to display current date when I open up a form. The date field should
be such that I can edit it to some other date, if required. On editing, the
new date should be stored in the database.
Pls reply asap.
Thanx in advance.

Set the DefaultValue property of the TextBox control to...

Date()
 
I

Ivan Grozney

SR,

On your form the set the default value for your <date> field to =DATE()
If the user doesn't change it, the it will save it as today's date.

hth
Vanya
 
S

SR

Thnxs.

I tried doing that. I works for current date but when I try to change it to
another date then it gives error.
Pls help me w/ code or any specific date field setting.
SR.
 
R

Rick Brandt

SR said:
Thnxs.

I tried doing that. I works for current date but when I try to change it to
another date then it gives error.

What's the error? Did you put =Date() in the DefaultValue or in the
ControlSource? Needs to be the former.
 
I

Ivan Grozney

SR,

What kind of error are you getting?

Is the =date() in the Default Value or in the Control Source?
It needs to be in the DefaultValue

Vanya
 
Top