jumpingjackjohn
02-28-2001, 06:18 PM
When i open up my form, i have a field called date, i have the properties set
to the field tab stop ( NO ). This way i could default todays date, My question is
how can i set the default date to todays date. Can anyone help me please.
cffuller
02-28-2001, 07:04 PM
in the properties of that field, you need to set the "DefaultControl" to "=Date( )". Just don't use the quotation marks.
jumpingjackjohn
03-06-2001, 04:20 PM
Thank you cffuller for the information on the default date. "=date()" but this does not work. I put up a file on feb 23 2001
and when I open this form and go to pass this field they is no change.
What am i doing wrong. PLEASE HELP.
I have been work on the problem for about
6 weeks.
thank you .
Pat Hartman
03-07-2001, 06:50 PM
Defaults only apply to new records. If you want to update the date of an existing record whenever that record is updated, you need to add a line of code to the form's BeforeUpdate event.
Me.YourTableDate = Date()
jumpingjackjohn
03-08-2001, 03:47 PM
Thank you for the information on the
default date, i did not know that the
"=date()" is just for new records. existing
records erquire a different line of code.
i understaned that the line of code go's
in the properties, then go to before update
event. up to this point i understain, but the
line of code i was not to successful with can
you be a little more detail in the code information.
Thank You For Your Time.
Pat Hartman
03-10-2001, 07:14 PM
The code does not go in in the control's controlsource property, it goes in the Form's BeforeUpdate event. Since in goes in a VBA function rather than a property, it shuld not be prefixed by the = sign.