Formatting fields

S

StarrKittrell

I want to format a field in a table to take either dates or text. Now if I
format it for "short date" it won't let me type in text ie: N/A or not
needed. Can this be done?
 
C

Clifford Bass

Hi,

I would suggest that you not do that. It will cause more problems than
it will solve. If you set the field to allow for Null (i.e. not be required)
then when it is not available or not needed, just leave it blank. If you
need to specify the difference between N/A and not needed create another
field to records that piece of information. Such as Reason_for_No_Date which
might be a Text field of say two characters; maybe with the following values:
NA for N/A or NN for not needed.

Clifford Bass
 
D

Duane Hookom

You can also set the format for a text box of a date or numeric field to
display "N/A" if the value is null/empty.
 
F

fredg

I want to format a field in a table to take either dates or text. Now if I
format it for "short date" it won't let me type in text ie: N/A or not
needed. Can this be done?

No! A field in your table is either Date datatype or a Text datatype.
You cannot enter text into a Date field, but you can, of course, enter
a date as text into a Text field. But then the value is treated as
Text, and cannot be sorted or processed as a date without conversion.

I would suggest, if the data entered is a Date, make the field a
DataTime datatype and simply leave the value blank if it is "N/A".
You can always display "N/A" in a report if the field is blank by
using an unbound control instead of the DateField control:

=IIf(IsNull([DateField]),"N/A",[DateField])
 

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