Creating a blank date field with a make-table query

  • Thread starter Thread starter tt
  • Start date Start date
T

tt

I need to create a table with a new date field which is
initially empty. I am creating the table with fields from
one table plus an empty field which is formatted as a date
field.
 
Well, I can't find a way to do it in a Make-table query alone. However, if
you add a column to your Make-table query (in the Query Builder) that looks
like this:
NewField: CDate(0)
the make-table query will create a new date column in the new table.
Unfortunately, it will have 12:00AM in the field. But if you follow your
Make-Table with the following Update Query:

UPDATE TableNew SET NewField = Null;

it will clear that new field (assumse the new table is named TableNew and
the new field is named NewField.)
 
That works. Thanks.
-----Original Message-----
Well, I can't find a way to do it in a Make-table query alone. However, if
you add a column to your Make-table query (in the Query Builder) that looks
like this:
NewField: CDate(0)
the make-table query will create a new date column in the new table.
Unfortunately, it will have 12:00AM in the field. But if you follow your
Make-Table with the following Update Query:

UPDATE TableNew SET NewField = Null;

it will clear that new field (assumse the new table is named TableNew and
the new field is named NewField.)


--
--Roger Carlson
www.rogersaccesslibrary.com
Reply to: Roger dot Carlson at Spectrum-Health dot Org





.
 
Another clever method Michel once demonstrated:

NewField: IIf(True,Null,#1/1/1900#)

-- you end up with date/time field, all nulls

-- works for text and number also
NewField: IIf(True,Null,0)
NewField: IIf(True,Null," ")
 
Back
Top