text field size

  • Thread starter Thread starter JohnE
  • Start date Start date
J

JohnE

In an Access2000 table if the Data Type is text, you have
a maximum of 255 characters. If you use the Memo for
Data Type you have 64,000+ characters in the field. Is
there a way to allow more then 255 but less then 64,000
in the field? I ask because I am using forms for
inputting the info but the fields will use more then the
255 but way less then 64,000. If I use the Memo type it
seems that there is alot of waste for a field that won't
need it all.
Anybody have ideas about this?
Thanks ... John
 
JohnE said:
In an Access2000 table if the Data Type is text, you have
a maximum of 255 characters. If you use the Memo for
Data Type you have 64,000+ characters in the field. Is
there a way to allow more then 255 but less then 64,000
in the field? I ask because I am using forms for
inputting the info but the fields will use more then the
255 but way less then 64,000. If I use the Memo type it
seems that there is alot of waste for a field that won't
need it all.
Anybody have ideas about this?
Thanks ... John

Memo fields do not use storage beyond what is actually entered (and a bit of
overhead). This is actually true for Text fields as well. If you define a
field of Text (255) and only enter 10 characters then you only use storage for
the ten characters.
 
Rick, thanks for the info. Then, and correct me if wrong,
to be on the side of caution, if a field is made for
comment, etc. it would be best to Data Type it as Memo.
Should anyone be a bit verbose in what they say. They go
over 255, the storage is only what they type. But the max
would be the 64,000+. Which I don't think anyone would
type that much.
*** John
 
If I use the Memo type it
seems that there is alot of waste for a field that won't
need it all.

Not really. A Memo field stores what you type, nothing more. In fact a
Memo field - if it's loaded from code rather than from the user
interface - can contain up to a gigabyte of data; but it doesn't store
a gig for each memo in a table, only what's actually used.
 
JohnE said:
Rick, thanks for the info. Then, and correct me if wrong,
to be on the side of caution, if a field is made for
comment, etc. it would be best to Data Type it as Memo.
Should anyone be a bit verbose in what they say. They go
over 255, the storage is only what they type. But the max
would be the 64,000+. Which I don't think anyone would
type that much.
*** John

Memo fields do have some disadvantages. They are actually stored
separately on disk with the table only storing a pointer to the data.
Because of that they cannot be indexed, sorted on or grouped on. They also
have a tendency to get corrupted more often.

I usually ask my users and try to keep comment fields as Text(255) unless
they indicate that there will definitely be times when they have to exceed
that.
 
Rick, thanks for the feedback. It was my thought as well
about keeping a limit on comments to 255 or less. There
are a few fields throught the app I'm doing that are
actually note screens for the people to use, but as
mentioned, only a few. Any others are the 255 or less
comment fields. If they need to expound on what they are
saying, I guess they will just need to pick up the phone
and call the person(s).
Thanks again.
*** John
 
How about creating a text field and a memo field in your table. Use an
unbound text field on your form and save the first 255 characters into the
text box and the rest into the memo field. Or multiple text fields could be
used instead of the memo field. Or create a subtable for the comments and
break up the comment into records of 255 in length. This will involve a bit
of coding but you will save everything entered without any waste.

Kelvin
 
Back
Top