Visual Basic Multi-Line Results

April 19, 2009 at 15:11:55
Specs: Windows XP Pro, Pentium 4 / 1GB
I'm working on this project for a class, it's Visual Basic, everything else on the program is working fine so far, but I'm having this one problem displaying results on multiple lines.

Now what the program is doing is reading this data from a text file and then there's 3 labels where the results are displayed. One label showing customers who's year value is >=5, 2nd where it's =2-4, and 3rd one where it's <2. Now it reads it and works fine, only thing is it's not displaying all the results, it's only displaying like the latest one it reads.

For example let's say there's 3 instances of where the year >=5, but it's only displaying the last one on the text file it reads. Here's the code below:

Program: http://www.liquidsmoke.net/vb.txt (part I'm having problem with starts around line 45)
Data File: http://www.liquidsmoke.net/sales.txt

Any help is greatly appreciated, need to have this done by tonight, thanks!

WEB/GRAPHIC/PRINT DESIGN: SPORTS" target="_blank">http://www.liquidsmoke.net/
SPORTS
FORUM: http://


See More: Visual Basic Multi-Line Results

Report •


#1
April 20, 2009 at 02:24:33
custfive = customers(i).name & ", " & customers(i).sales & vbCrLf
custfour = customers(i).name & ", " & customers(i).sales & vbCrLf
custtwo = customers(i).name & ", " & customers(i).sales & vbCrLf

Your problem are on these lines. They should read:
custfive = custfive & customers(i).name & ", " & customers(i).sales & vbCrLf
custfour = custfour & customers(i).name & ", " & customers(i).sales & vbCrLf
custtwo = custtwo & customers(i).name & ", " & customers(i).sales & vbCrLf


Report •
Related Solutions


Ask Question