On the date field problem, is the control source for the EventDate field
defined as a date type in the underlying table?
If so, then you have to put the # sign date delimiter around the value that
you're sticking into the default value. That way, the underlying table
field sees a date and is happy. Otherwise, it just sees a string that is
cannot interpret as a date, and gives you the 12/30/1899 value.
To do this, you code should read:
Me.EventDate.DefaultValue = "#" & Me.EventDate & "#"
This is the way to specify a date in a string
What type of table field is the control source for your ID field in the
second question? Also, what is the list source for your combo box and do
you have Limit To List = yes?
> Good Morning,
> I want to use the currently entered value to prefill the next new record.
[quoted text clipped - 20 lines]
>
> Thanks in advance
Renee - 02 Feb 2005 19:35 GMT
The table and form are date data types, changing the """" to "#" worked
wonderfully except for one issue. Both the table and the form do not have a
default value for this date field. The default value is only added on the
after update event. The form is set to data entry true. When I open the form,
it now defaults to 12/30/1899. After I add a new record, the entered date
will prefill the next new record perfectly. How to a fix the opening value?
The datatype of the source table for the ID is text, and the combo box is
set to limit to the list.
Thank you again for your Support JP :)
Renee
> On the date field problem, is the control source for the EventDate field
> defined as a date type in the underlying table?
[quoted text clipped - 39 lines]
> >
> > Thanks in advance
JP - 02 Feb 2005 21:38 GMT
Renee,
Check and make sure that there is no default value in the default value
property field of the form -- it may have picked up a permanent default
value along the way.
Also, you could just assign a default value in the form open event. For
example, you could put in a line that says
Me.EventDate.DefaultValue = now()
The Now function returns the current date. I'm not sure if you would have
to put the # around it, so try it both ways.
> The table and form are date data types, changing the """" to "#" worked
> wonderfully except for one issue. Both the table and the form do not have a
[quoted text clipped - 53 lines]
> > >
> > > Thanks in advance
Renee - 03 Feb 2005 17:33 GMT
I added a default value as today's date, and on the form close event reset
the any default values that changed during form use.
Thank you for your help JP!
> Renee,
>
[quoted text clipped - 76 lines]
> > > >
> > > > Thanks in advance