Hi, I was wondering if anybody can help with this problem.
I currently have a txt file with data listed similar to that below. What I am trying to do is create an output txt file which will list only specific criteria which is requested. For example just "cpntcs" which have played "Lin02" only.
The code will skip through the input file and produce an output file with just "cpntcs" and "lin02" directly underneath.
I have based my code on a previous VBA module which i have used which adds "000" into the "cpntcs" line only. As I mention this has been amended to what "I" think the VBA coding should like.
I am awareb that there are possibly many ways to do this, but I am only interested in using it In VBA in Access.
The module looks like this :
Function inputtooutputhandle(infile As String, outfile As String)
Dim InputHandle As Integer
Dim OutputHandle As Integer
Dim InfileHandle As String
Dim OutfileHandle As String
InputHandle = FreeFile
Open infile For Input As #InputHandle
OutputHandle = FreeFile
Open outfile For Output As #OutputHandle
Do While EOF(InfileHandle)
If Left(InfileHandle, 6) = "CPNTCS" Then
InputHandle = OutfileHandle
OutputHandle = InputHandle
Print #InputHandle, OutfileHandle