Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

12/30/1899 - want to force Access to read it as Null 2

Status
Not open for further replies.

cutestuff

Technical User
Sep 7, 2006
162
CA
hi,

I have a linked table from Excel where the main date field displays "12/30/1899" if the field is null. How can I force access to read this field as null?

Please and thank you in advance.

jen
 
In a query you could do this:

IIf(myDateColumn = #12/30/1899#, '', Format(DateColumn, "mm/dd/yyyy")) as DateColumn

Not quite NULL, but pretty close. You might be able to replace the empty string with vbNullString if you insist on showing the nulls.

Hope this helps,

Alex

Ignorance of certain subjects is a great part of wisdom
 
I don't think you want to change the data type to text.
12/30/1899 is the same as 0. You can use:
IIf(myDateColumn = #12/30/1899#, Null,DateColumn)) as DateColumn
Or, you can just set the Format property to display "" if the value is 0.


Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Thank you both for your replies!
It helped me a lot!
Appreciate it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top