A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Formatting fields



 
 
Thread Tools Display Modes
  #1  
Old November 19th, 2008, 06:08 PM posted to microsoft.public.access.tablesdbdesign
StarrKittrell
external usenet poster
 
Posts: 4
Default Formatting fields

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?
  #2  
Old November 19th, 2008, 06:40 PM posted to microsoft.public.access.tablesdbdesign
Clifford Bass[_2_]
external usenet poster
 
Posts: 1,295
Default Formatting fields

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

"StarrKittrell" wrote:

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?

  #3  
Old November 19th, 2008, 06:58 PM posted to microsoft.public.access.tablesdbdesign
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Formatting fields

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.

--
Duane Hookom
Microsoft Access MVP


"Clifford Bass" wrote:

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

"StarrKittrell" wrote:

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?

  #4  
Old November 19th, 2008, 08:33 PM posted to microsoft.public.access.tablesdbdesign
fredg
external usenet poster
 
Posts: 4,386
Default Formatting fields

On Wed, 19 Nov 2008 09:08:11 -0800, StarrKittrell wrote:

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])

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
 




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


All times are GMT +1. The time now is 09:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.