borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (algorithm)Next Topic (Read multiple files in a folder and count number of occurance of a word!) New Topic New Poll Post Reply
AndreaVB Forum : VBA (Access, Excel, Word, ...) : Transfer Text \\Variable filename Solved Topic
Poster Message
gosamerone
Level: Big Cheese

Registered: 22-03-2005
Posts: 20

icon Transfer Text \\Variable filename

Not sure how to do this, but I want to import a text file and base the file name on a text field in a form.

Text field is called txtInvControlnumber
Import spec is called ControlnumImportSpecification
Table to import into is T_ScannerImport

I want to select\enter my control number on the form and import the txt file that matches.

Here is what I have so far, but I can't get the variable to work.

Dim Ctrlnum As String
Ctrlnum = txtInvControlnumber

docmd.Transfertext acExportDelim,ControlnumImportSpecification,T_ScannerImport,"\\xxx01\act\InventoryControl\WIP\" & Ctrlnum & ".txt",No,,

30-05-2006 at 03:50 PM
View Profile Send Email to User Show All Posts | Quote Reply
gosamerone
Level: Big Cheese

Registered: 22-03-2005
Posts: 20
icon Re: Transfer Text \\Variable filename

I solved this and if anyone wants to know, it goes like this

Dim Ctrlnum As String
Ctrlnum = txtInvControlnumber
Dim fullnum as String
fullnum = "\\xxx01\act\InventoryControl\WIP\" & Ctrlnum  ".txt",No,,
docmd.Transfertext acExportDelim,"ControlnumImportSpecification", _
    "T_ScannerImport", fullcntrlnum, No

30-05-2006 at 07:22 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VBA (Access, Excel, Word, ...) : Transfer Text \\Variable filename Solved Topic
Previous Topic (algorithm)Next Topic (Read multiple files in a folder and count number of occurance of a word!) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder