473,378 Members | 1,317 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Naming Convention for Text Export

How can I name a text export using periods in the file name:

ABC.D31.HBCVF.txt.rbd31

as opposed to something like "Export.txt"?

Each time I try, Access changes the text export file name to:

ABC#D31#HBCVF#txt#rbd31

I am using a fixed width text export.
Aug 23 '08 #1
3 2166
ADezii
8,834 Expert 8TB
I don't think that Access will allow you to do that directly, but ironically, you can Rename the Fixed Width Text File immediately after creating it, allowing Periods, as in:
Expand|Select|Wrap|Line Numbers
  1. DoCmd.TransferText acExportFixed, "<My Specs>", "Employees", "C:\Test\ABC.D31.HBCVF.txt", True
  2. Name "C:\Test\ABC#D31#HBCVF.txt" As "C:\Test\ABC.D31.HBCVF.txt"
BTW, it is a good idea to leave the .txt Extension at the end of the File.
Aug 23 '08 #2
That worked perfectly! The file name (and extension) is for an import into a mainframe program. Since I have to overwrite this same file name on each export, is there a command to delete the text file at the start of the routine?

Currently the program halts when it realizes there is already a file named the same as I am trying to change the export file to.
Aug 24 '08 #3
ADezii
8,834 Expert 8TB
That worked perfectly! The file name (and extension) is for an import into a mainframe program. Since I have to overwrite this same file name on each export, is there a command to delete the text file at the start of the routine?

Currently the program halts when it realizes there is already a file named the same as I am trying to change the export file to.
Try:
Expand|Select|Wrap|Line Numbers
  1. Kill "C:\Test\ABC#D31#HBCVF.txt"
Aug 24 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

27
by: Derek | last post by:
The company where I work uses a naming convention that I have never used before. They use mixed-case letters for public member functions, but lower-case with underscores for the rest, like this:...
7
by: cmiddlebrook | last post by:
Hi there, I keep finding myself getting inconsistent with naming conventions for things like member variables, class names etc and I just want to find something that suits me and stick to it. I...
0
by: Steve Jorgensen | last post by:
In a schema I've been working on recently, a convention I evolved was to use a consistent naming pattern such that, for instance, a Resident could appear in a ResidentSet, and could be referred to...
4
by: Mark Broadbent | last post by:
stupid question time again to most of you experts but this is something that continually bothers me. I am trying to get into the habit of naming variables and controls in an assembly as per...
14
by: 42 | last post by:
Hi, Stupid question: I keep bumping into the desire to create classes and properties with the same name and the current favored naming conventions aren't automatically differentiating them......
4
by: Sturdy | last post by:
Hi, I'm new to C# and .NET. I'm a first time user of Visual C# 2005 Express and have a very basic question. I've looked at several links and lots of docs but can't find any tips on naming multiple...
114
by: Jonathan Wood | last post by:
I was just wondering what naming convention most of you use for class variables. Underscore, "m_" prefix, camel case, capitalized, etc? Has one style emerged as the most popular? Thanks for...
35
by: Smithers | last post by:
Is it common practise to begin the name of form classes with "frm" (e.g., frmOneForm, frmAnotherForm). Or is that generally considered an outdated convention? If not "frm" what is a common or...
1
by: stuart.medlin | last post by:
I have an Access 2003 application that I recently converted from Access 97. I have a routine in which I use to export the data that the users have keyed into a text file. This text file resides...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.