Solved

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

Posted on 2013-12-16
2
1,061 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
2 Comments
 

Accepted Solution

by:
developingprogrammer earned 0 total points
Comment Utility
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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now