473,507 Members | 9,962 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Transfer Text problem in Access VBA

I have a strange problem with a docmd.transfertext statement. I have
set up an import specification to transfer in a .txt file by fixed
width. When I do the import using the specification the file imports
just fine into the table. When I use the transfertext statement for
import the contents of the file are loaded into the first column. Has
anyone run into this problem and do they have any
suggestions/solutions?

Here is the code in Access VBA:

Dim dkg As Variant, filstr As String
dkg = Application.FileDialog(msoFileDialogFilePicker).Sh ow
filstr =
Application.FileDialog(msoFileDialogFilePicker).Se lectedItems(1)

DoCmd.TransferText , "NYImpSpec", "NYImport", filstr

The first three line only allow the user to select the file through a
file dialog box. The fourth line is where the problem lies.

Thanks for any help in advance.

Dave Christman

Jul 14 '06 #1
1 2180
You have to specify the type of file you are importing. The way you
have the statement written, you are using the default which is
acImportDelimited. You are importing a fixed width file. Try changing
your import statement to
DoCmd.TransferText acImportFixed, "NYImpSpec", "NYImport", filstr

Hope that helps!

Jul 14 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2305
by: Andy Davis | last post by:
Has anybody tried and had any success exporting data directly from ACT! 2000 to an Access database? I need to transfer data from ACT! to Access, but the data is all imported as text, including date...
5
7389
by: Tom | last post by:
Hi I am trying to transfer to a different .ASPX page using Server.Transfer. However, I get the following error: "Error executing child request for .aspx." Anyone know why? Thanks for...
2
1512
by: Melissa | last post by:
I'm learning about Server.Transfer to see if it will be worthwhile so we can cut down on the number of session variables we use. And in doing a couple of tests following the .NET Framework SDK...
1
3483
by: Victor Song | last post by:
Hi We are trying to stream a file using server.transfer rather than response.redirect. We have it working for IIS 5.0 but IIS 6.0 refusing to let us transfer the file. If we do the less...
2
1850
by: P K | last post by:
I am using server.transfer for a website being developed in vs.net 2005 And I need to get the posted values after server.transfer. For this I set the second parameter "true" in the transfer...
8
3870
by: bryan | last post by:
I've got a custom HttpHandler to process all requests for a given extension. It gets invoked OK, but if I try to do a Server.Transfer I get an HttpException. A Response.Redirect works, but I really...
6
3393
by: Hanspeter Leupin | last post by:
Hi NG, I used the Internet Data Transfer Library of Dev Ashish found at http://www.mvps.org/access/modules/mdl0037.htm to transfer text files from a server with HTTPS in my old Ms Access 97...
4
3986
by: evantay | last post by:
I'm using ASP.NET 2.0 with VS.NET 2005. I'm trying to access properties from my master pages within a page that inherits from that master page (a child page). However the values are always null....
1
5198
by: sycryc | last post by:
Here's my Q. I have a form in which users fill in text boxes and select checkboxes. After the form is completed, the user clicks the submit button which then transfers all to a word for editing,...
0
1633
by: Pega | last post by:
Hi, im doing a college project, which is a banking app, it is more or less fully functioning, the user can log in and check their balance, but i have trouble setting up a transfer function, so the...
1
7029
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7481
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5039
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3190
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1537
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.