Null value as default for blank field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am creating a clinical database which will be submitted to a nationwide
harvest and I need to be sure that empty fields are read as "null" and not
zero length data. I know this is a simple question, but how do you set the
default in a field property to be "null"? Does Access do this automatically
on all empty fields?
Tx
 
Hi, Rocky.
I need to be sure that empty fields are read as "null" and not
zero length data.

No value is assigned to a field (which will be read as NULL) if the user
types nothing into a field when creating a new record. The two exceptions to
this are for text data type fields and memo data type fields that allow zero
length strings and the user enters a text value into the column, then deletes
it. Ensure that every text field's and every memo field's Allow Zero Length
Property is set to No, and then all of your fields in the table will either
have a value or be NULL.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.
 
No value is assigned to a field (which will be read as NULL) if the user
types nothing into a field when creating a new record. The two
exceptions ...

3rd exception? As long as the DefaultValue property has been left blank.

HTH,
 
I suppose we interpret that differently. ;-)

I figure that if there's a default value, then there's a value in the field
when creating a new record, so Rocky won't have to worry about a zero length
string. (Since Rocky is trying to avoid the zero length string, he wouldn't
use it as the default value, even though it's possible to set it to "".)

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top