Prompt for spreadsheet to import

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

Guest

I would like to have a spreadsheet that the user is prompted to find and have
that spreadsheet populate to a specific table. I have researched this site a
bit and found that I probably want to use "docmd.transferspreadsheet". My
problem is I can't get the command to work. The following is the command I
am using:

DoCmd.TransferSpreadsheet acImport, , "Test"

I assumed that by leaving areas blank it would prompt the user (like
exporting to excel).

As always thanks for your help.

Robert
 
The prompt is a different kettle of fish altogether. You have to
decide and implement the means for determining the pathname of the
target file.

*Then* you can DoCmd....." to transfer the spreadsheet.

The "navigate to file" dialogue is included in the newest version of
Access. For earlier versions there is code on www.mvps.org/access
that was contributed by Ken Getz. The code looks intimidating but you
can copy and paste and then tweak to completion. It's much handier
for your users than having to find the file and then copy or type it
into a prompt.

HTH
--
-Larry-
--

Robert_DubYa said:
I would like to have a spreadsheet that the user is prompted to find and have
that spreadsheet populate to a specific table. I have researched this site a
bit and found that I probably want to use
"docmd.transferspreadsheet". My
 

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