Hi Shawn,
Thanks for the reply.

No it doesn't work - this generate an rte 13 Type MisMatch.  I'm starting to 
think this is either a bug or a shortcoming in the Data Environment which knows 
this is a date field and is expecting a date and nothing but a date.  When the 
table/field is designed in Access there doesn't seem to be a way to tell it 
that a date field is Not Required nor that Zero length is allowed.

Here's a simple way to repro it.
Create a project, add a command button and reference the Data Environment 
Instance.
Add a Connection to the DE.
To that connection add a DECommand "insert_date" which has a simple text format 
saying INSERT INTO date_table (date_field) VALUES (?)
An Access database which has a table "date_table" which has a field 
"date_field" defined as Short Date
In the click event of the command button place:- DataEnvironment1.insert_date 
Null
Run it, click the button and you'll get Invalid Use of Null.

If you change the DeCommand to INSERT INTO date_table (date_field) VALUES (Null)
Then it works, so it's not the database that's having the problem.

Regards
Ian



  ----- Original Message ----- 
  From: Shawn K. Hall 
  To: [email protected] 
  Sent: Saturday, January 08, 2005 1:21 AM
  Subject: RE: [vbhelp] Data Environment


  Hi Ian,

  > If it's called by "DE.acommand NULL" then it generates
  > run time error "Invalid Use of Null" and I cannot 
  > find a format that will allow a null to be passed.

  Does this work?
    DE.acommand "NULL"

  Regards,

  Shawn K. Hall
  http://12PointDesign.com/
  http://ReliableAnswers.com/


[Non-text portions of this message have been removed]




'// =======================================================
    Rules : http://ReliableAnswers.com/List/Rules.asp
    Home  : http://groups.yahoo.com/group/vbHelp/
    =======================================================
    Post  : [email protected]
    Join  : [EMAIL PROTECTED]
    Leave : [EMAIL PROTECTED]
'// =======================================================
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/vbhelp/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to