Automatically fill text box with yesterday's date

  • Thread starter Thread starter p-rat
  • Start date Start date
P

p-rat

I have an unbound text box. Format to short date. How would I
automatically have this filled with yesterday's date. I've tried
date-1 in the Control Source and in the Default Value, but neither
works. Any help would be appreciated. Thanks.
 
p-rat said:
I have an unbound text box. Format to short date. How would I
automatically have this filled with yesterday's date. I've tried
date-1 in the Control Source and in the Default Value, but neither
works. Any help would be appreciated. Thanks.

If you don't want to be able to override the entry,
a control source of

= Date() -1

should work. Don't forget the equal sign.

Tom Lake
 
p-rat said:
I have an unbound text box. Format to short date. How would I
automatically have this filled with yesterday's date. I've tried
date-1 in the Control Source and in the Default Value, but neither
works. Any help would be appreciated. Thanks.
Bear it in mind that if you go into the form on a daily basis, the date in
the text box will change accordingly.
 
Back
Top