A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Setting Default Date/Time field to be blank or null



 
 
Thread Tools Display Modes
  #1  
Old April 14th, 2008, 11:12 PM posted to microsoft.public.access.gettingstarted
dj
external usenet poster
 
Posts: 262
Default Setting Default Date/Time field to be blank or null

I have a date/time field in my record that I plan to use to indicate when a
record was modified. If the record was never modified, I'd like that field
to be blank. It seems to want to default to 0 which is giving me a bogus
time of 12:00. All my records are originally imported in weekly so seldom
are records manually added. I don't know if that makes a difference or not.
If this is something that can't be done, I guess I can make the default NOW()
but I was really hoping for a blank. Thanks in advance, dozzee
  #2  
Old April 15th, 2008, 01:25 AM posted to microsoft.public.access.gettingstarted
fredg
external usenet poster
 
Posts: 4,386
Default Setting Default Date/Time field to be blank or null

On Mon, 14 Apr 2008 15:12:00 -0700, Dj wrote:

I have a date/time field in my record that I plan to use to indicate when a
record was modified. If the record was never modified, I'd like that field
to be blank. It seems to want to default to 0 which is giving me a bogus
time of 12:00. All my records are originally imported in weekly so seldom
are records manually added. I don't know if that makes a difference or not.
If this is something that can't be done, I guess I can make the default NOW()
but I was really hoping for a blank. Thanks in advance, dozzee


If it's defaulting to 0, then open the underlying table in Table
Design View.
Find the date field in question. Delete the 0 from the DefaultValue
property.
Save the change.
Open the form in Design View.
Select the Date control. Delete the 0 from the DefaultValue property.
Save the change.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #3  
Old April 15th, 2008, 03:36 AM posted to microsoft.public.access.gettingstarted
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default Setting Default Date/Time field to be blank or null

The question that begs asking is "Who set the field's Default Value" to zero
in the first place? While Access automatically assigns a Default Value to
some datatypes in Table Design View (such as assigning zero to numeric
datatypes) it doesn't do this for Date/Time datatypes.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via http://www.accessmonster.com

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:15 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.