Macro condition that i cannot find answer for anywhere

  • Thread starter Accessghostrider via AccessMonster.com
  • Start date
A

Accessghostrider via AccessMonster.com

Hello

I want to run a macro and tell it to import a spreadsheet, then open a
table in design view to change the data type of a field then after i have
saved that table's design continue to run the next step. Any ideas?

So basically,
1. How to import a table
2. how to continue the macro after saving the design of a table

Thanks
 
J

John W. Vinson

Hello

I want to run a macro and tell it to import a spreadsheet, then open a
table in design view to change the data type of a field then after i have
saved that table's design continue to run the next step. Any ideas?

So basically,
1. How to import a table
2. how to continue the macro after saving the design of a table

Thanks

I'm not skilled at macros, and a task this complex probably should use VBA
code in any case... but I must ask, WHY do you want to do this? Routinely
creating and proliferating tables is generally not advisable! Could you
instead perhaps have one large pre-created master table, and import the
spreadsheet into it (with additional fields if need be to identify which
spreadsheet is the source of the data)?
 
J

Jerry Whittle

Step 1 is pretty straight forward with a macro. The TransferSpreadsheet
action should do it.

Step 2 can't be done with just a macro. You probably need a query that looks
something like this in SQL view:

ALTER TABLE A
ALTER COLUMN beerz TEXT(10) ;
 
Top