Field size when importing from Excel

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

The text fields come in as 255 characters when importing. Is there a way
that the import sets the filed size to the character width in the excel
column?

Or is there a way to set the width on the import. I bring a large employee
db in once a month, and I have to chnage the filed widths each time or the
db is huge.

Thanks
 
It appears you are importing into a new table. Your default text field size
in your database appears to be set to 255. The better way to control field
sizes and data types is to import to an existing table.
Create a table with the data types and field sizes you want. Then import
into that table. You will, of course have to clear the table's data prior to
the import. You can do that with one simple line of code:

CurrentDb.Execute("DELETE * FROM mytablenamehere;"), dbFailOnError
 
Back
Top