dbTalk Databases Forums  

'Saving' null date

comp.database.ms-access comp.database.ms-access


Discuss 'Saving' null date in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Chris
 
Posts: n/a

Default 'Saving' null date - 07-23-2003 , 10:24 PM






I have an unbound form from which data entered by user is saved to various
tables when user clicks on 'save' command buttons. Among the fields are
several date fields that do not have to be entered in all circumstances. I
use an SQL statement & docmd.runsql but if date field remains null, I get an
error about a field not being saved. I tried Nz function but I don't think
this works with dates. Any suggestions on how to avoid error would be
gratefully accepted. Thanks.



Reply With Quote
  #2  
Old   
bala
 
Posts: n/a

Default Re: 'Saving' null date - 07-25-2003 , 08:11 AM






hi chris

1. do check the design of table and see whether the option required of
the date field is set to no.

2. check if the date is selected by the user using len function is
isempty etc.., if date is been selected pass along the datevalue in
the sql statement or else pass a NULL.

hope this helps.

thanx, peace, have a great day

regards
bala

Reply With Quote
Reply




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 On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.