transfrer spreadsheet - text file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have code to import an Excel file as

DoCmd.TransferSpreadsheet acImport, , "StateMaster", "c:\StateMaster", True

I now want to import the same file as a text file. When I try to perfom
this action the code cannot find the file, I tried adding the extension and
still didin't work.

Any suggestions?

Thanks,
Matt
 
Matt -
I'm not sure why you would need to import the same file two different ways -
unless you were converting a file to Excel before importing it (and now want
to eliminate that step)

Anyway -

Make sure you're using the right command to import the file. When you're
working with text files, .csv files, and such, use

docmd.transfertext

instead of

docmd.transferspreadsheet

the two functions take a different approach to "reading" the data.

HTH

Amanda
 

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

Back
Top