Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Macros / November 2003

Tip: Looking for answers? Try searching our database.

Error message using macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David - 08 Nov 2003 19:51 GMT
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.
tina - 08 Nov 2003 20:47 GMT
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.
>.
David - 08 Nov 2003 21:06 GMT
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.
    >.
Ken Snell - 09 Nov 2003 00:49 GMT
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.

Signature

      Ken Snell
<MS ACCESS MVP>

> Hi Tina,
>      No,I typed in  C:\My Documents\Excel\races, I even tried adding .cvs and .txt to the file fomat
[quoted text clipped - 19 lines]
>      on this subject would be appreciated.
>      >.
Bruce - 09 Nov 2003 05:01 GMT
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!!!
David - 09 Nov 2003 19:46 GMT
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?
Ken Snell - 09 Nov 2003 20:35 GMT
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"

Signature

      Ken Snell
<MS ACCESS MVP>

> Hi all ,
> Thanks for your replies.
[quoted text clipped - 3 lines]
> file resides.
> Any ideas?
David - 09 Nov 2003 21:51 GMT
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
tina - 09 Nov 2003 22:18 GMT
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.
>Many thanks
>.
David - 09 Nov 2003 23:21 GMT
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
Ken Snell - 09 Nov 2003 22:54 GMT
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.

Signature

      Ken Snell
<MS ACCESS MVP>

> 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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.