I need to set a date field on a form to a date variable.
- Have sub_form called "f_Advertise subform"
- Field on the sub_form called "PostedDate" (date, short)
- Have a variable called "NewPostedDate", (dim as date), e.g., 07/19/2010
I tried the following things:
1) me.PostedDate = NewPostedDate (got error message)
2) me.PostedDate = (# NewPostedDate #) (got error message)
3) me.PostedDate.DefaultValue = NewPostedDate (no error message, but
PostedDate field did not display the new date)
4) me.PostedDate.DefaultValue = NewPostedDate (no error message, but
PostedDate field did not display the new date)
5) me.PostedDate.DefaultValue = NewPostedDate
If me.Dirty=true then me.dirty=false
(no error message, but PostedDate field did not display the new date)
6) tried putting NewPostedDate variable as the default value in the field's property. It translated the entry as "NewPostedDate"
Your help would be greatly appreciated!