PC Review


Reply
Thread Tools Rate Thread

Date Defaulting in Data Field

 
 
=?Utf-8?B?Um9zcw==?=
Guest
Posts: n/a
 
      26th Jan 2006
I have an unbound date field in a form (short date). Sometimes, the date in
the form is Empty / Null. When I save to the underlying table, my date
variable is set to 12:00:00 instead of null or empty. The forms field
evaluates to null. The recorded date in the underlying table is saved as
12/30/1899.

1. Why is this?
2. How can I save "nothing" in the date field of the table?

Thanks

Ross
 
Reply With Quote
 
 
 
 
Jeff Boyce
Guest
Posts: n/a
 
      26th Jan 2006
Ross

Check the table definition ... that date/time field probably has a default
value of 0 (which translates in Access date/time parlance to 12/30/1899 @
12:00).

--
Regards

Jeff Boyce
<Office/Access MVP>

"Ross" <(E-Mail Removed)> wrote in message
news:04E2A246-4156-422A-8C91-(E-Mail Removed)...
> I have an unbound date field in a form (short date). Sometimes, the date

in
> the form is Empty / Null. When I save to the underlying table, my date
> variable is set to 12:00:00 instead of null or empty. The forms field
> evaluates to null. The recorded date in the underlying table is saved as
> 12/30/1899.
>
> 1. Why is this?
> 2. How can I save "nothing" in the date field of the table?
>
> Thanks
>
> Ross


 
Reply With Quote
 
=?Utf-8?B?Um9zcw==?=
Guest
Posts: n/a
 
      26th Jan 2006
Jeff,

There are no defailts set and the record is "pre-existing" (Not a new record).

"Jeff Boyce" wrote:

> Ross
>
> Check the table definition ... that date/time field probably has a default
> value of 0 (which translates in Access date/time parlance to 12/30/1899 @
> 12:00).
>
> --
> Regards
>
> Jeff Boyce
> <Office/Access MVP>
>
> "Ross" <(E-Mail Removed)> wrote in message
> news:04E2A246-4156-422A-8C91-(E-Mail Removed)...
> > I have an unbound date field in a form (short date). Sometimes, the date

> in
> > the form is Empty / Null. When I save to the underlying table, my date
> > variable is set to 12:00:00 instead of null or empty. The forms field
> > evaluates to null. The recorded date in the underlying table is saved as
> > 12/30/1899.
> >
> > 1. Why is this?
> > 2. How can I save "nothing" in the date field of the table?
> >
> > Thanks
> >
> > Ross

>
>

 
Reply With Quote
 
Jeff Boyce
Guest
Posts: n/a
 
      27th Jan 2006
Ross

A value of "0" translates to the date/time you mentioned. Somehow a zero
ended up in there.

Did you check the default on the form, or in the table definition?

--
Regards

Jeff Boyce
<Office/Access MVP>

"Ross" <(E-Mail Removed)> wrote in message
news:45F391A1-DB50-4984-8145-(E-Mail Removed)...
> Jeff,
>
> There are no defailts set and the record is "pre-existing" (Not a new

record).
>
> "Jeff Boyce" wrote:
>
> > Ross
> >
> > Check the table definition ... that date/time field probably has a

default
> > value of 0 (which translates in Access date/time parlance to 12/30/1899

@
> > 12:00).
> >
> > --
> > Regards
> >
> > Jeff Boyce
> > <Office/Access MVP>
> >
> > "Ross" <(E-Mail Removed)> wrote in message
> > news:04E2A246-4156-422A-8C91-(E-Mail Removed)...
> > > I have an unbound date field in a form (short date). Sometimes, the

date
> > in
> > > the form is Empty / Null. When I save to the underlying table, my

date
> > > variable is set to 12:00:00 instead of null or empty. The forms field
> > > evaluates to null. The recorded date in the underlying table is saved

as
> > > 12/30/1899.
> > >
> > > 1. Why is this?
> > > 2. How can I save "nothing" in the date field of the table?
> > >
> > > Thanks
> > >
> > > Ross

> >
> >


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Defaulting date field John Microsoft Access 1 9th Jun 2007 10:34 PM
Defaulting date field John Microsoft Access Forms 1 9th Jun 2007 10:34 PM
Find last date in a field and return data from another field in that record TitanMan Microsoft Access Queries 2 6th Jun 2006 04:30 AM
bind data to anothermfield. Date field to Month field. =?Utf-8?B?cGdyb2JpbnNvbg==?= Microsoft Access Form Coding 6 15th Sep 2005 05:21 AM
bind data to anothermfield. Date field to Month field. =?Utf-8?B?cGdyb2JpbnNvbg==?= Microsoft Access Database Table Design 1 13th Sep 2005 12:11 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:16 AM.