update the design of the table

gkovac

New Member
Joined
Sep 4, 2007
Messages
5
Hi all

this is my first official post here, but i've been following this board for some time and it has really proven helpful).

My first question here goes: Is it possible to somehow "re-set" the design of a table? Let say i have a table:
- ID text 50
- name text 200
- price integer

and i'd like to change the darn thing to
- ID text 17
- name text 23
- price single

If this is possible please let me know how. Thanks a lot for the help!

Grega
 
You know, more things to add so you understand what the above is.
In the above case, I was starting with a set of un-normalized data that I re-expressed as an aggregated crosstab query. I needed to find a way to dump the data into a spreadsheet and I wanted to use the simple CopyFromRecordSet approach because of speed.

Each source recordset would have a single leading date field and a VARIABLE number of fields following - invariably, it would be integer values for the column names. So, I wrote this routine that extracted all of those and used them as the field names for a new table - and then pasted them all into it.

Later (not part of the question) I'd paste that table directly into Excel.

The above is relevant because it demonstrates a more advanced technique. You can write code that analyzes your source tables and then build new tables based on what it finds...anything is possible...perhaps you're looking for specific field names...perhaps you need to insert a new field in a given position, etc etc.
 
Upvote 0

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,215,038
Messages
6,122,798
Members
449,095
Latest member
m_smith_solihull

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