Date or "NA" field format

K

Kevin K

I have a table with fields that will contain dates when a task is completed.
However some of the records will not complete all of the fields. Is there a
way to format the field for short date OR contain "NA" should it not be
applicable to that record? I don't want the default value to be "NA", which
I'm not sure is even possible with the format set to short date, because I
need to be able to query on which records are null on that field to determine
what tasks need to be completed.
 
D

Dirk Goldgar

Kevin K said:
I have a table with fields that will contain dates when a task is
completed. However some of the records will not complete all of the
fields. Is there a way to format the field for short date OR contain
"NA" should it not be applicable to that record? I don't want the
default value to be "NA", which I'm not sure is even possible with
the format set to short date, because I need to be able to query on
which records are null on that field to determine what tasks need to
be completed.

On a form where you want the date to be updatable, you could set a text
box's Format property to

m/d/yyyy; m/d/yyyy; m/d/yyyy;"NA"

or something along those lines. On a report, or on a form where you
don't intend for the user to be able to update the date field, you could
just set the text box's controlsource to:

=IIf([YourDateField] Is Null, "NA", Format([YourDateField], "short
date"))
 

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

Top