I have to create a Gradebook program with a Mdb provided by our prof. it is suppose to compose a letter in a listbox to say as so
Student Name
address
Dear student
your grade for CMSC 100 are as follow
finalexam:
semester grade:
Best wishes for a good summer, Professor Jones.
Here is what I have so far.

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'GRADEBOOKDataSet.Students' table. You can move, or remove it, as needed.
Me.StudentsTA.Fill(Me.DSGrades.Students)
'TODO: This line of code loads data into the 'GRADEBOOKDataSet.Grades' table. You can move, or remove it, as needed.
Me.taGrades.Fill(Me.DSGrades.Grades)
' Catch any fatal errors
' Example: bad connection
Try 'Used Try catch method after reading on VB for Dummies that it is perfer on DB programs.
' Initially fill the datatables with query data which I am still trying to figure out.
taGrades.Fill(DSGrades.Grades) 'Code seen was used by a road map seen from a try, catch method on ms vb website
StudentsTA.Fill(DSGrades.Students)
Catch ex As Exception
' Show error
MessageBox.Show("A fatal database error has occurred. Program will now close.", "DB Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
' Close program
Close()
Finally
taGrades.Dispose()
StudentsTA.Dispose()
End Try
End Sub
' Manage datasets based on selected tab
Private Sub tabCtrlMain_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tabCtrlMain.SelectedIndexChanged
If tabCtrlMain.SelectedTab Is TabScores Then
' Re-fill dataset
taGrades.Fill(DSGrades.Grades)
ElseIf tabCtrlMain.SelectedTab Is TabReport Then
' Re-fill calculated grades (if exam scores changed)
StudentsTA.Fill(DSGrades.Students)
End If
' Reset the status message text
StatusMessage.Text = ""
End Sub
#Region " Helper Functions "
' Determines letter grade
Public Function GetLetterGrade(ByVal semesterAvg As Double) As String
Select Case semesterAvg
Case Is >= 90 : Return "A"
Case Is >= 80 : Return "B"
Case Is >= 70 : Return "C"
Case Is >= 60 : Return "D"
Case Else : Return "F"
End Select
End Function
#End Region
Now I am stuck. Please help

Never mind I figured it out myself.

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.