View Full Version : Import from Excel


bionicman
12-19-2003, 06:23 AM
Can someone please tell me where i can find more information on Importing from Excel? I have looked over the board and found a few things, but still need more information.

What i need is this:
I need to import a file from Excel daily that will have a different name (report1/1/03, report1/2/03, report1/3/03, etc.) My goal is to have this import automatically, but i don't know how to do that. also, wouldn't it have to prompt the user for the date or something?

Any help would be appreciated.

Thanks

FoFa
12-19-2003, 06:28 AM
If you use VBA you can run the DoCmd.TransferSpreadsheet command and substitute the file name for one you either, request on a form, or two generate from data.

bionicman
12-19-2003, 06:50 AM
Thank you for your reply.

I understand what you mean, but can you give me a little more information on this?

If you look at this Thread (http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=59047) , it explains my problem a little better.

Thanks once again!

FoFa
12-22-2003, 08:50 AM
You pretty much have it in that other post. What you need to do is create an Event Procedure, in that event procedure use the Docmd.TransferSpreadshet. It will tell what you what you need, like the Table to put it in, the version of excel, and the file name. You can use the code you had in that other thread for the file name. You just can't use a macro to do. What you can do is if there are some other things you want to run from the macro, you also use Docmd.RunMacro to run a macro before and or after this other command.