?
Solved

DoCmd.TransferText file name CANNOT have multiple . if not error 3011

Posted on 2013-12-16
2
Medium Priority
?
1,142 Views
Last Modified: 2013-12-17
hey guys,

not really a question but just want to share with yall cause it caused me quite a bit of time (when i have none!!! = ((   )

ok so basically when you're importing a text file using DoCmd.TransferText, your text file cannot have multiple dots. this was the name of my text file

"Work Hours 27.05.2013IMPORT.txt"

it kept giving me error 3011 saying it can't find the file.

MS probably did a read from the left to find the first dot ha (i think!! = P  )

anyway i just removed all the dots using a replace function and then inserted the last dot in

strFilePath = Replace(strFilePath, ".", "")
    strFilePath = Left(strFilePath, Len(strFilePath) - 3) & ".txt"

Open in new window


hope it helps someone next time! = )
0
Comment
Question by:developingprogrammer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

by:
developingprogrammer earned 0 total points
ID: 39725794
hi Jim, okie dokie, here's the additional comment i'll post to accept as answer.

with super experts like yourself, Christian and all the others posting articles, i don't think i'm really "fit" to post an article at the moment. when i improve more and really become better, i mayyyy just be good enough to post an article then! thanks Jim!!
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question