Summary of Student Information System optimization

Source: Internet
Author: User

Student Information System optimization

1, when the query, if the uncheck "by the number", the text box 1 will not be clear, the 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 drop-down box can enter the character how Po, in the property to change a bit can be

The default value of the combo style property is 0-dropdown combo, which changes to 2-dropdown list

0-dropdown Combo drop-down combo box, including a drop-down list and a text box that you can select from the list to live in a text box to enter

1-dropdown Combo Simple combo box, including a text box and a list that you cannot drop, you can select from a list or enter content in a text box

2-dropdown Combo drop-down list, this style only allows you to select 3 from the drop-down list, msgflexgrid a blank line when querying, and modify the code


4th Calendar Problem There are two ways

Add the Microsoft Windows Common Controls-2 6.0 in the engineering-part, and then you can add the DTPicker control or you can add the MonthView control, and the end result is the same.

But I think a bit not very good, because it takes one months and one months to go to the point, so I set the UpDown property, I think this is very convenient


5 When the database is empty

Add code to a modified form


The first to determine whether the database is empty, if this time to click to change the record what, will report errors, so simply let it can not be used well, so I added the following two lines of code, that is, the control is not available, so to avoid reporting errors.

6 in the Add score form

Set selected secondary number auto popup 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 Setup Course window, avoid adding courses 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 the list has the same name

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 It's just a start, and I'm going to get farther on the road to learning.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.