Optimization of Student Information system
1, when the query, if the cancellation of the "by school number", the text box in the 1 will not be clear, this solution is to add a piece of code,
Private Sub Check1_click ()
If Check1.value = 1 Then
Txtsid.visible = True
Else
Txtsid.text = ""
End If End Sub
2, the dropdown box can enter the character how Po, in the properties of the change can be
The default value for the combo style property is 0-dropdown combo, change it to 2-dropdown list
0-dropdown Combo combo box that includes a Drop-down list and a text box that you can select from a list to enter in a text box
1-dropdown Combo Simple combo box, including a text box and a list that can't be pulled down, you can select from the list or enter content in the text box
2-dropdown combo Drop-down list, which only allows you to select from a drop-down list of 3, Msgflexgrid query with empty lines, modify the code
There are two ways to the 4th calendar.
Add Microsoft Windows Common Controls-2 6.0 in the project-part, and you can add the DTPicker control or add the MonthView control, and the end result is the same.
But I think it's a little bit bad because it takes one months and one months to get to the point, so I set the UpDown attribute, and I think it's very convenient.
5 When the database is empty
Add code to a modified form
First of all to determine whether the database is empty, if this time to click to modify the record of what, will report a mistake, so simply let it can not be used well, so I added the following two lines of code, that is, the control is not used, so as to avoid the report error.
6 in the Add score form
Set the secondary number automatically pop-up name
Private Subcombosid_click ()
Dim MRC as ADODB. Recordset
Dim txtSQL as String
Dim Msgtext as String
txtSQL = "Select*from student_infowhere student_name= '" & Combosid.listcount & "'"
Set MRC = ExecuteSQL (txtSQL, Msgtext)
Txtname. Text = MRC. Fields (1)
End Sub
7 in the Set Up Course window, avoid adding lessons repeatedly
Private Subcmdadd_click ()
Dim Selectcourseas Integer
Dim I as Integer
Dim J as Integer
For selectcourse = 0 tolistallcourse.listcount-1
If Listallcourse. Selected (selectcourse) =true Then
Listselectcourse. Additemlistallcourse.list (Listallcourse. ListIndex)
' Add a course to the Listselectcourse list
For i = 0 tolistselectcourse.listcount-1
For j = i + 1 tolistselectcourse.listcount
' Determine if there is the same name in the list
If Listselectcourse. List (i) =listselectcourse. List (j) Then
Listselectcourse. Removeitemj
MsgBox "This course has been added. ", vbOKOnly + vbexclamation," hint "
Exit Sub
End If
Next J
Next I
End If
Next Selectcourse
End Sub Student Information System is just the beginning, I will be on the road of learning more and more further away.