Importing csv files

jasn_78

Registered User.
Local time
Tomorrow, 08:22
Joined
Aug 1, 2001
Messages
214
I am currently attempting to create a macro to import a csv file to an already existing database. When I do this through a manual import there is no problems however when i create the macro it says that I have an invalid field name, so can someone please help as I am lost.

Thanks
 
When you manually import, do you import ALL the fields or do you leave a couple out? The field names in Excel are your culprit. They have to meet Access's naming rules and types.
 
I import all the field names
 
Ok I have the macros working it was a asimple case of creating specifications for each table. My next question is how do I set a path for that file as it continually says file cannot be found when I transfer the database and files even though they are both in the same directory.
 
You put the file path as part of the arguments in the macro? And it still gives you the error?
 
I just left it as the file name, this worked the first time i did it now that i have moved both the database and the file even though they are in the same directory as one another still it doesn't seem to find it.
 
Redo the macro. You need to put the full path name. If you look at your macro, it is still showing the "old" path. I think that's your problem.

Post back.
 
jwindon

yeah done it works fine I knew it would I just thought that surely if it is in the same directory as the database it should pick it up as it did the first time before I moved it. Oh well just have to change it if I move it again.
 

Users who are viewing this thread

Back
Top Bottom