|I have a textbox that I need to run this query when the value changes for the textbox.
Private Sub tbStudentID2_TextChanged(sender As Object, e As EventArgs) Handles tbStudentID2.TextChanged
mySql = "SELECT DateDiff('d', [DateofRank], [currentDate]) FROM StudentData"
myCommand = New OleDbCommand(mySql, myConnection)
myRead = myCommand.ExecuteReader
Do While myRead.Read = True
tbDays.Text = myRead(0).ToString()
86 is display no matter which record I choose. I think it is just retrieving the first record in the in the table.
I want to display the number of days since a student has tested by subtracting DateofRank from currentDate. I am open to other ideas on how to achieve this.