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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Creating empty date field with make-table query



 
 
Thread Tools Display Modes
  #1  
Old May 23rd, 2004, 02:55 PM
Gary Walter
external usenet poster
 
Posts: n/a
Default Creating empty date field with make-table query

Hi TT,

just in case "TT" 'tt' (other post)

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," ") --get type text(255), all null
NewField: IIf(True,Null,0) --get type Long, all null

-- or use Cxxx functions
NewField: IIf(True,Null,CCur(0)) --get type Currency, all null
NewField: IIf(True,Null,CDbl(0)) --get type Double, all null

So clever...and eliminate "binary type" bugaboo
when you use

NewField: Null

Please respond back if I have misunderstood.

Good luck,

Gary Walter


"TT" wrote in message
...
I am trying to create a new table using a make-table query
where one of the fields is formatted as a date but has no
data in it initially.



  #2  
Old May 24th, 2004, 09:03 AM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default Creating empty date field with make-table query

Brilliant!

"Gary Walter" wrote in message
...
Hi TT,

just in case "TT" 'tt' (other post)

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," ") --get type text(255), all null
NewField: IIf(True,Null,0) --get type Long, all null

-- or use Cxxx functions
NewField: IIf(True,Null,CCur(0)) --get type Currency, all

null
NewField: IIf(True,Null,CDbl(0)) --get type Double, all

null

So clever...and eliminate "binary type" bugaboo
when you use

NewField: Null

Please respond back if I have misunderstood.

Good luck,

Gary Walter


"TT" wrote in message
...
I am trying to create a new table using a make-table query
where one of the fields is formatted as a date but has no
data in it initially.





 




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 09:44 AM.


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