Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

transfer text problem

Status
Not open for further replies.

hedgracer

Programmer
Mar 21, 2001
186
US
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? Thanks for any help in advance.

Dave Christman
 
Huh?

You mention docmd (a method of the _VFP object), but it doesn't have a transfertext method.

It sounds like you're asking someone to debug your code without showing your code.

What are you doing?
 
Here is the code in Access VBA:

Dim dkg As Variant, filstr As String
dkg = Application.FileDialog(msoFileDialogFilePicker).Show
filstr = Application.FileDialog(msoFileDialogFilePicker).SelectedItems(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.

Dave Christman
 
I'm sure it's very lovely Access code too, but the VFP doesn't have a transfertext method.

I suspect you need to be asking this question in an Access forum. This is a Foxpro forum.
 
OH HELL!!!!!!

I just realized tek-tips gifted me with a new forum I never selected. I'm SO SORRY.

Discard all my posts.
 
And what about this ?
DoCmd.TransferText [!]acImportFixed[/!], "NYImpSpec", "NYImport", filstr

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top