Ok I have just finished the coding for this

'This is sub for when 5 is selected
Sub avg5
'Open comma delimited File
open "d:\Assign.txt" for input as #assign
Input "Please Enter a students ID ";stuid$
while eof(#assign)=0
Input #assign, id$,nme$,dob$,sub$,scr

If stuid$=id$ then


        If nostud=1 Then
            Print " "
            Print "Swansea College BTEC Certificate for, "+nme$
            Print "Date of Birth " +dob$
            Print "Subject Results:"

        End if

    Print sub$+":"+str$(scr)+"%"

End if

    PRINT " "
    Print "Course Average: "+str$(avgscr)+"%"
    Print " "

close #assign
End Sub


What I want to know is if there is a way to put an error onto this so that if someone enters in a wrong ID, its sohws them a error message, if you can post, what you think it is, I will be really happy, I think i will have to open another loop for the error message, but what do you think?

I don't know Liberty BASIC (I know some JustBASIC, but...), so this might not help but:

If studid$<>id$ then
' open a form with an error

Does that work?