Making fields same between tables

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I have two tables A & B which I need to make same in structure. How can I
via code do the following;

Go through both table structures and,

1. If a table A field is missing in table B then to create it in table B?

2. If a table A field is present in table B but the type is different then
to change table B field type to match table A field type?

Many Thanks

Regards
 
Hi

I have two tables A & B which I need to make same in structure. How can I
via code do the following;

Go through both table structures and,

1. If a table A field is missing in table B then to create it in table B?

2. If a table A field is present in table B but the type is different then
to change table B field type to match table A field type?

Many Thanks

Regards

It would be fairly difficult to automate this, but... WHY!? do you want two
redundant tables?

Your best bet would be to copy Table A to a new table, selecting the option
"Structure only"; if there is data in Table B already, then run an append
query to populate it.

But I'm really concerned since I cannot imagine *any* good reason for a
database to contain two identically structured tables!
 
Back
Top