I am have written a function to import excel spreadsheets into access. The fields on the spreadsheet could differ therefore the table is created on import with transferspreadsheet command and is called tblRecon.
The problem is this table is linked to another table in the database after it is imported and certain fields are importing as the wrong datatype therefore the there is a datatype mismatch.
Is there a way I can force a field to be of certain datatypes on the import without using the Import Spec as I know the import spec defines the what fields are imported and my spreadsheets the fields on the spreadsheet could vary.
The user must have at least for defined fields imported. For example: VisitID, On the db this field is Text but when impoted it is Number. Can I have automate it to be text so the query works.
Help appreciated.
Cheers in advance,
Neemi
The problem is this table is linked to another table in the database after it is imported and certain fields are importing as the wrong datatype therefore the there is a datatype mismatch.
Is there a way I can force a field to be of certain datatypes on the import without using the Import Spec as I know the import spec defines the what fields are imported and my spreadsheets the fields on the spreadsheet could vary.
The user must have at least for defined fields imported. For example: VisitID, On the db this field is Text but when impoted it is Number. Can I have automate it to be text so the query works.
Help appreciated.
Cheers in advance,
Neemi