[AccessD] force Null date/time data type value

A.D.Tejpal adtp at touchtelindia.net
Fri Oct 3 00:28:01 CDT 2003


Susan,

    Let the table T_Books consist of fields Author(text), Title(text) and RefDate(date type). Both the following statements will append a record having Null value in the date field -

    (a) If default value of RefDate is not Null -
        DoCmd.RunSQL "INSERT INTO  T_Books " & _
                "(Author, Title, RefDate)  " & _
                "Values('AAA',  'TTT' , Null) ;"

    (b) If default value of RefDate is already set as Null -    
        DoCmd.RunSQL "INSERT INTO  T_Books " & _
            "(Author, Title)  " & _
            "Values('AAA',  'TTT') ;"

Regards,
A.D.Tejpal
--------------
  ----- Original Message ----- 
  From: Susan Harkins 
  To: AccessD at databaseadvisors.com 
  Sent: Friday, October 03, 2003 06:16
  Subject: [AccessD] force Null date/time data type value


  I'm using INSERT INTO to append records. When a text string isn't
  appropriate, I can use a zero-length string, but not the dates -- I've found
  no way to force a Null value using INSERT INTO. Any help?

  Susan H.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20031003/3c9e8452/attachment-0001.html>


More information about the AccessD mailing list