Type of field

S

Steven

I am importing an xl file to a table and will take this
table and run some tests on it and if everything is ok I
am going to import it to the main table. Sometimes the
users of the system will mess up the xlfile formats. What
function can I use to tell the field type of the fields in
the new imported table. If I try to import the table to
the main table and the types are wrong, it will error
out. I want to verifty that the fields types are correct
before appending to the main table.

Thank you,

Steven
 
K

Ken Snell

Probably best if you always import the EXCEL file's contents into a
temporary table, then use an append query to copy the the records to the
real table. You can use calculated fields in the append query that involve
wrapping the values from the temporary table so that the proper formats are
present. See CStr, CDbl, etc. for examples of such functions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top