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

Creating a report

Status
Not open for further replies.

Dilbert10000

Technical User
Oct 4, 2001
4
0
0
US
I need a form to read a text file which is setup as:

"ordernum", "time"

and then create a list on the form of each record, the amount of data can change from day to day. please help
 
Dilbert (hehe),

Try this as an example:

Open INI_FILE For Input As filenum 'Set proper source and
While Not EOF(filenum)
Line Input #filenum, inrec
inrec = UCase$(RTrim$(LTrim$(inrec)))
If inrec <> &quot;[SYSTEM]&quot; And Mid(inrec, 1, 1) <> &quot;#&quot; And inrec <> &quot;[APPLICATION]&quot; And inrec <> &quot;[CLIENT]&quot; And Len(inrec) <> 0 Then
posnum = InStr(inrec, &quot;=&quot;)
keyword = Mid(inrec, 1, posnum - 1)
parm = Mid(inrec, posnum + 1)
Select Case keyword
Case &quot;VERSION&quot;
VERSION = parm
End Select

This reads in each line then you can extract what you wish and put into an array....Hope this gets you starter.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top