hello ! can you please help me..?
i want to limit the number of students(60) that will be enrolled in one section and prompt a message that it surpass the limit.... i inserted it in my combobox1
..here's my code :
strsql = "select * from Schedulings where Sections = '" & ComboBox1.Text & "'"
Dim acscmd As New OleDb.OleDbCommand
acscmd.CommandText = strsql
acscmd.Connection = asconn
acsdr = acscmd.ExecuteReader()
TextBox9.Clear()
TextBox5.Clear()
ListView1.Items.Clear()
If acsdr.Read = 2 Then
MsgBox("Too many enrolled in this section")
Else
While (acsdr.Read())
TextBox9.Text = (acsdr("SectionNames"))
TextBox5.Text = (acsdr("Adviser"))
showmyrecords()
End While
acscmd.Dispose()
acsdr.Close()
End If
it doesnt work. how should i do it?
kindly help me