473,378 Members | 1,549 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.

Help with transfertext method

46
Hi,

I am using Acess 2007 and am writing the data from a table into a text "CSV" file using the "transfertext" method. I run the following code and it creates the file with a name I input at runtime and saves the file to my documents folder. I can't figure out how to specify a different location to save the file without hard coding the location and file name. Any help will be greatly appreciated.

Expand|Select|Wrap|Line Numbers
  1. Dim Message, Title, Default, MyValue
  2. Message = "Enter PO Number"    ' Set prompt.
  3. Title = "Enter PO Number"    ' Set title.
  4. MyValue = InputBox(Message, Title)
  5. DoCmd.TransferText acExportDelim, , "table1", MyValue & ".csv", True
thanks,
Jeff
Oct 5 '10 #1
1 1748
ADezii
8,834 Expert 8TB
For these types of situations, I like to use the Standard Window's Folder Dialog which provides a professional look as well as being basically foolproof. It is a little difficult to explain here since it does use the API, but I have provided a fully functional Demo for you to look at and appraise. Good luck, and any questions, please feel free to ask.
Attached Files
File Type: zip TransferText.zip (21.3 KB, 98 views)
Oct 5 '10 #2

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

Similar topics

2
by: daniel.w.gelder | last post by:
Hey again. I'm still working on my functor class, and now it works with method functions too; you pass it the method function, as well as the object you want to be 'this' when the method is...
1
by: Gordon Keeler | last post by:
Hi all. I'm trying to develop an automated method of converting Access (97 or 2000) databases to SAS using DBMSCopy. I've discovered that there is not a rigid standard set to control the naming...
11
by: Shyguy | last post by:
I need to import a text file pretty much daily. I download the file and change the name to a standard name and then run the code to import the file into a table in my database. The problem is...
0
by: chris | last post by:
Hi, I'm trying to import some text files in a simple access table, but sometimes it miss some rows after import. here is the code: Public Function OpenMyApplicationData() As Boolean Dim Upid As...
1
by: Jack Addington | last post by:
I am just looking for some advice on naming my methods - I am getting confused as to what some of them mean now I have the following scenario - A Visual Data Object and a Logical Data Object. ...
2
by: Anthony Nystrom | last post by:
Can someone please help me with this... Here is the method and what it needs: Public Sub xyz(sender as object, cbaevent as System.Drawing.Printing.PrintPageEventArge) I am looking for and...
1
by: Chris Calzaretta | last post by:
Hello, I need help with method descriptions for example when i say public var as new object.class and i go var.classmethod
3
by: Greg Strong | last post by:
Hello All, Why does Access (2003) create indexes on importing a CSV file to a table when using the TransferText Method in VB when the specification name does NOT have any indexes indicated? ...
0
by: nagar | last post by:
On some PCs I have my application completely crash (with the standard Windows message) when I make a call to the Help.ShowHelp method to display the help guide Here's the call I make. Form...
9
by: ITHELP85 | last post by:
I have a method that returns an ArrayList and in the Main method i want to convert that list to an array. public static void main (String args) { **How can I turn the scoresList which is...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.