cannot change field size

J

JRS

I am tryingto change the field size on fields in my table. They are 255 and
I want to make them less than 10. I can change, but when I save....I get
there is not enough spsce or memory which is not the case. I originally
imported the table from excel.
 
D

Douglas J. Steele

What version of Access? How big is your database file? How much free space
on the hard drive (specifically, on the drive pointed to by the TEMP and/or
TMP environment variable)?

When you change a field size, behind the scene Access actually adds a new
field, populates that new field, then deletes the old field. That means if
you're too close to the maximum size of the database file (1 Gb in Access 97
and earlier, 2 Gb in Access 2000 and newer), you'll run into problems.

Similarly, Access will probably grab some temporary workspace in the TEMP
(or TMP: I can never remember which!) folder, and if there isn't enough free
space there, you'll run into problems.

Try compacting your database before you make the change.

However, be aware that it doesn't really matter. While the field size may
currently be 255, Access only takes as much space as is actually required,
so that you're not wasting any space having the larger field size.
 
J

John Vinson

I am tryingto change the field size on fields in my table. They are 255 and
I want to make them less than 10. I can change, but when I save....I get
there is not enough spsce or memory which is not the case. I originally
imported the table from excel.

See Douglas' comments first; but if you really do want to do this, I'd
suggest creating a new, empty table with the desired field sizes. Then
run an Append query to copy the data from your current table into the
new one. Once you've determined that the data is all there, delete the
old table and Compact the database.

Since (as Douglas says) Access doesn't store trailing blanks anyway,
you may not see any significant change.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Top