Error message using macro

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

Guest

Having a problem with macro when trying to import text data. Error Message ' The Microsoft Jet database engine could not find the object ' races.txt' make sure the object exsists and that you spell its name and the path name correctly.' Thats strange because it works perfectly when I do it manually. I'm a new user of Access 2000 with no previous experience of using databases so please excuse me if the question appears simple to any of you. Any help on this subject would be appreciated.
 
in your macro's Action Arguments, File Name did you enter
just the file name races.txt? if so, you need to enter the
full filepath - drive, folder, etc.

hth

-----Original Message-----
Having a problem with macro when trying to import text
data. Error Message ' The Microsoft Jet database engine
could not find the object ' races.txt' make sure the
object exsists and that you spell its name and the path
name correctly.' Thats strange because it works perfectly
when I do it manually. I'm a new user of Access 2000 with
no previous experience of using databases so please excuse
me if the question appears simple to any of you. Any help
on this subject would be appreciated.
 
Hi Tina,
No,I typed in C:\My Documents\Excel\races, I even tried adding .cvs and .txt to the file fomat
but it still showed the same error message. The data I'm trying to import is a delimited file.
Thanks for your reply
----- tina wrote: -----

in your macro's Action Arguments, File Name did you enter
just the file name races.txt? if so, you need to enter the
full filepath - drive, folder, etc.

hth

-----Original Message-----
Having a problem with macro when trying to import text
data. Error Message ' The Microsoft Jet database engine
could not find the object ' races.txt' make sure the
object exsists and that you spell its name and the path
name correctly.' Thats strange because it works perfectly
when I do it manually. I'm a new user of Access 2000 with
no previous experience of using databases so please excuse
me if the question appears simple to any of you. Any help
on this subject would be appreciated.
 
It would appear that you may have an extraneous space between the last \ and
the beginning of races.txt.

Check what you typed as the macro's argument again.
 
You might try enclosing the text in quotes. In any expression in Access (or most databases) if there are any spaces you have to surround it with Quotes. You have to enter the extension fo the file.

Example: "C:\My Documents\Excel\races.txt"

Hope this helps!!!
 
Hi all ,
Thanks for your replies.
Bruce I tried your suggestion and still had an error message, this time it was
"C:\My Documents\Excel\" is not a valid path. Make sure that the path name
is spelled correctly and that you are connected to the server on which the
file resides.
Any ideas?
 
In a macro, you do not use " marks for the filename argument unless you
precede the expression with an = sign:

C:\My Documents\Excel\File.txt

or

="C:\My Documents\Excel\File.txt"
 
Hi Ken,
Thanks for your response, I tried putting the '=' sign leading the expression and still it
will not work. I have given up now, and will carry on importing manually, which works perfectly.
Many thanks
 
don't give up yet - try one last thing. i just had a brain
flash (2 watts). :) i don't think your filepath is typed
wrong, it think it is just incorrect, period. try this:

1. open Explorer, open your My Documents folder and find
the text file you're trying to import.
2. right click on the file, and select Properties from the
shortcut menu.
3. on the General tab, look at Location. there's your full
filepath to the file (and i'll bet good money it's not
C:\My Documents).
4. click on the file path and press the End key on your
keyboard, to make sure you see the full filepath.
5. now just hightlight the complete filepath and copy it.
6. paste into the File Path field in your macro, and add
\YourFilename.txt at the end.

hope this works! :)

-----Original Message-----
Hi Ken,
Thanks for your response, I tried putting the '=' sign
leading the expression and still it
will not work. I have given up now, and will carry on
importing manually, which works perfectly.
 
As suggested before, I believe that the path you're using (and/or the
filename itself) is not typed correctly. Tina has suggested something that
may identify if this is a correct conclusion. Good luck.
 
Hi Tina
I did as you suggested but i'm afraid it didn't work.
There is just one last thought,would it make any
difference if the data that i'm trying to import from
Excel was originally exported from another program
via a SQL statement. I dont think it would because as Iv'e
said before I can import manually.
Thanks once again for your help.
 
Back
Top