Stevon 0 Newbie Poster
sub HighestMark
open "Z:\Program\Assignment\StudentGrades.txt" For input as #StudentGrade
while eof(#StudentGrade) = 0
    input #StudentGrade,Id$,Name$,DOB$,Sub$,Grade
if Grade > Highmark then
    Highmark = Grade
end if
wend

print "Congratulations "; Name$; " Has Won £500 For Attaining "; Highmark; " in "; Sub$
end sub

how would i go about by showing the subject that the student had the high mark in ? as you can see ive tried Sub$ but i get the last subject read on file shown

the file is attached could some one have a quick look please

Thanks :D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.