I have some tables that do not import correctly. Essentially, instead of posting the correct data type, all fields are pulled in as text values.
What I want to do is loop through the data in each field and reset the Data Type (for each field) based on the data within (which is currently formatted as Text).
For Example: If I loop through the data in Field1 and all the data Data is a Date, I want to change the Data-Type of the table (for said field) to "Date"... If the data is currency, then change the data type of that field to currency etc... etc...
I think I may be able to use the TypeName() function (to evaluate the data into a data-type...can I?). If so, I was also hoping that someone may already have run into this issue and had a piece of code (or a function they've used) that I could look at, so I don't have to invent the wheel.
Respectfully,
Gary
What I want to do is loop through the data in each field and reset the Data Type (for each field) based on the data within (which is currently formatted as Text).
For Example: If I loop through the data in Field1 and all the data Data is a Date, I want to change the Data-Type of the table (for said field) to "Date"... If the data is currency, then change the data type of that field to currency etc... etc...
I think I may be able to use the TypeName() function (to evaluate the data into a data-type...can I?). If so, I was also hoping that someone may already have run into this issue and had a piece of code (or a function they've used) that I could look at, so I don't have to invent the wheel.
Respectfully,
Gary