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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Write EDI Files With Access

Status
Not open for further replies.

JesseH

MIS
Aug 9, 2001
63
0
0
US
How do you write variable length comma delimited files using access. For example,

LI,RB2861,124,CA,0
LI,RB2746,440,CA,0
AI,409999,609932, 385005,100,Favorite Market,2222 Main Street,,Santa Monica,CA,90404,1, 1,0,11242003
IH,409999,609932,,,11242003,10001,11242003
II,RB1718,1,2,CA,3200,,0
II,RB2746,2,1,CA,3200,,0

How do you define the file? Do you put the entire line together using concatentation? Do you hard code the <CR>?
 
In the VBA help file take a look at the Open, Print # and Close # instructions.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Check out the file scripting object (FSO). You can read/format/write text files with this object.
 
Here is an example of FSO to read a directory structure to get you started.


Function ReadDirectory2()
'-- Microsoft Scripting Runtime Library needed.

''-- Define some FSO objects
Dim objFSO As Object
Dim objFile As File
Dim objFileItem As Variant
Dim objFolder As Folder
Dim objSubFolder As Folders
Dim objFolderContents As Variant
Dim objFolderItem As Variant

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("c:\edi")
Debug.Print objFolder.Name

'- Top folder and files
Set objFolderContents = objFolder.Files
For Each objFileItem In objFolderContents
Debug.Print "--"; objFileItem.Name
Next

'- Sub folders and files
Set objSubFolder = objFolder.SubFolders
For Each objFolderItem In objSubFolder
Debug.Print " "; objFolderItem.Name

Next

End Function
 
There are (also) a few specific EDI routines buried in these (Tek-Tips) fora. I would look for (search?) some of the standard record /field headings from EDI, such as SOH ...





MichaelRed


 
Dear cmmrfrds, I was searching Amazon to find books that cover the scripting you are referring to. I found Microsoft Windows 2000 scripting and Self Paced Guide. Are these appropriate for the scripting you are referring to? Can you suggest some titles?

Thanks
Jesse
 
Dear cmmrfrds, I was searching Amazon to find books that cover the scripting you are referring to. I found Microsoft Windows 2000 scripting and Self Paced Guide. Are these appropriate for the scripting you are referring to? Can you suggest some titles?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top