Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplicate table properties from one to another

Status
Not open for further replies.

iamthebestuk

Technical User
Jan 31, 2005
48
0
0
GB
I have a 'Main Table' which gets updated every month with three other smaller tables (smaller in terms of records).

My problem is that the smaller tables may not necessarily have all the fields of the 'Main Table' or may not be in the same format (ie. datatype, field size, indexed) and/or in the same order.

So I'd like to create a macro that cycles through the 'Main Table' storing the field names, formats and order then changing the three smaller tables to reflect the design of the 'Main Table'.

Help welcomed.



Power is Knowledge
Knowledge is Power
 
seems a rather long winded way of doing things, can't you just impose the correct formatting on the smaller tables beforehand?

anyway, if you wanted to do this, you can use the tabledefs to access the field names and properties of each table, and then you can loop through your smaller tables and changing the formats of the necessary values...

--------------------
Procrastinate Now!
 
No I can't format the smaller tables beforehand.

Unfortunately your suggestion does not help, as it I already knew what I wanted to do but did not know how to do it.



Power is Knowledge
Knowledge is Power
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top