
Allowing a date field to be null value
On Sun, 01 Sep 1996 11:37:17 -0500, Ganes Vaidhyanathan
Quote:
>hi:
>I,m writing a software for one of the departments of Louisiana State
>university.I have a question regarding this.
>I'm using MS Access 2.0 as back end and Visual basic 4.0 as front end.
>I have a mask edit box for the date field and the data type for this has
>been declared as date/Time in the table in access.
>The system is giving an error message when i leave the date field blank.
You mean when you attempt to add a new record, yes?
Quote:
>How do i overcome this.I want to code in such a way that even if they
>don't enter anything in this mask edit box the record should be
>accepted.
>I would appreciate if you can give me the code.
>If you need some more clarifications you can E_mail me.I will be glad to
>answer you.
If the field is _not_ part of the primary key, then use Access to correct
the problem. Bring up Access and open you database. Select the table
and go into design mode. Find your field and set the required attribute to
"NO". That is all there is to it.
If the field is part of the primary key. Do the above, then set the
atribute for the key to accept null values.
Peter Mikalajunas
http://www.xnet.com/~kd9fb