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
Solved

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

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
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…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

829 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