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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Renaming Fields...

Status
Not open for further replies.

Rjc8513

Technical User
Feb 12, 2001
140
US
Access 97- I am importing an Excel 95 file into Access as a table and it comes in with impossibly long field names.

Does anyone know if I can change the field names using VB code?

Thanks.

Richard...
 
Not directly. My approach would be to set up a MakeTable query. Go ahead and import the Excel information. Use the MakeTable query to simply transfer the whole thing to a new table with whatever field names (and other modifications / validations) desired. Then delete the imported table.

Of course, like most operations, there are a myriad of alternatives to this. to mention a few:

Read the excel sheet directly and populate your table with the data (cells). Use your own field names from the start.

Link to the excel sheet, make your table from the link, not the import.



MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top