"Microsoft Access can't change the data type." mes

Gates Is Antichrist

Well-known Member
Joined
Aug 15, 2002
Messages
1,961
As I tried to save changed table properties (reducing text fields from 255 to 3), I received this messagebox message, followed by "There isn't enough disk space or memory."

Well, I do believe I disagree with that little part at the end, but regardless, what do I do now?

I would like to be able to modify table properties without VBA or native SQL. Given the error message, is doing a new "Make table" my next move? And if so, how do you restrict a make-table field to be 3 characters, when -- for all he knows -- the source is 255 characters?

Finally: need I even care about that 255? If I browse the table, it doesn't SEEM to have 251 blank spades in the actual data. Tell me I'm just unjustifiably paranoid :)

Again, I want to stick to the standard Access operations - not to into editing the SQL. Thanks.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Re: "Microsoft Access can't change the data type."

Gates Is Antichrist said:
As I tried to save changed table properties (reducing text fields from 255 to 3), I received this messagebox message, followed by "There isn't enough disk space or memory."

Well, I do believe I disagree with that little part at the end, but regardless, what do I do now?

I would like to be able to modify table properties without VBA or native SQL. Given the error message, is doing a new "Make table" my next move? And if so, how do you restrict a make-table field to be 3 characters, when -- for all he knows -- the source is 255 characters?

Finally: need I even care about that 255? If I browse the table, it doesn't SEEM to have 251 blank spades in the actual data. Tell me I'm just unjustifiably paranoid :)

Again, I want to stick to the standard Access operations - not to into editing the SQL. Thanks.

Hello,

One method might be to copy your table (whilst in the database window). When you click Paste you're given the option of pasting the structure or the structure and data - choose Structure Only. Then change the field size in your newly created table and copy and paste the records from the old one. Bit manual but it should work.

According to Access help you should minimise the size of fields. If you only need 3, then set it to 3. If you keep the field size at 255 the size of the MDB will not increase, Access will only use what it needs for each and it won't set aside space for all 255 characters. Personally, I've found little performance to be gained by reducing field size compared to other optimisation methods (but there will be some, no matter how small).

Finally, if you want to specify a field length in a make table query just use something like this:-

CREATE TABLE MyTable
(
FirstField CHAR(3),
SecondField CHAR(255),
ThirdField INTEGER
)
 
Upvote 0
Re: "Microsoft Access can't change the data type."

Thanks, dk - copy structure (and tweak) was the best solution I received on the outside. However he suggested to then do an append query. That is a fairly painless route, but a copy and paste is even easier.

I always thought that you couldn't do that, but you spurred me to look again. What do you know, there is a "paste append" choice on tables - goody!
 
Upvote 0
Re: "Microsoft Access can't change the data type."

Gates Is Antichrist said:
That is a fairly painless route, but a copy and paste is even easier.

I'll correct myself on that. This was the easiest append query in history.

Since both source and dest. had identical field names, all I had to do was the .* field, and each field was handled. Whodathunk that Microsoft :devilish: would implement something so well?!
 
Upvote 0

Forum statistics

Threads
1,221,538
Messages
6,160,411
Members
451,644
Latest member
hglymph

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top