Summary of the main functions of Student Management System Information Query

Source: Internet
Author: User

For information query, this function is relatively simple, mainly including querying student status and querying scores. The msflexgrid control is mainly used.

I think dd (4) is a better array of Boolean variables. This variable can only be used as a tag. Select a method to query, select a method, or select multiple methods to query information, and use the DD () tag to record the information.

Previously, I always felt that the Boolean variable was quite simple. I did not expect it to play a major role in the system of student management.

If trim (txtname. Text) = "" then
Msgbox "name cannot be blank", vbokonly + vbexclamation, "warning"
Txtname. setfocus
Exit sub
Else
Dd (1) = true

If dd (0) then
'Locate the records that meet student_id = txtsid and student_name = txtname from the result_info table.
Txtsql = txtsql & "and student_name = '" & txtname. Text &"'"
Else
'Find the record with full student_name = txtname from the result_info table
Txtsql = txtsql & "student_name = '" & txtname. Text &"'"
End if
End if

 

When a Boolean variable is mentioned, when another numeric value is converted to a Boolean value, 0 is converted to false, while other values are converted to true. When the Boolean value is converted to another data type, false becomes 0, and true becomes-1.

The properties of the textmatrix attribute of the msflexgrid control.

Mshflexgrid. textmatrix (I, j) = string

Indicates setting the text content of line I and column J of mshflexgrid (note that the title is the first line)

STR = mshflexgrid. textmatrix (2, 3)

The text content in the second and third columns of mshflexgrid.

 

Txtsql = txtsql & "order by student_id"
Set MRC = executesql (txtsql, msgtext)
With myflexgrid
. Rows = 2
. Cellalignment = 4
. Textmatrix (1, 0) = "Exam No"
. Textmatrix (1, 1) = "student ID"
. Textmatrix (1, 2) = "name"
. Textmatrix (1, 3) = "shift no"
. Textmatrix (1, 4) = "Course name"
. Textmatrix (1, 5) = "score"
Do while not MRC. EOF
. Rows =. Rows + 1
. Cellalignment = 4
. Textmatrix (. Rows-1, 0) = MRC. Fields (0)
. Textmatrix (. Rows-1, 1) = MRC. Fields (1)
. Textmatrix (. Rows-1, 2) = MRC. Fields (2)
. Textmatrix (. Rows-1, 3) = MRC. Fields (3)
. Textmatrix (. Rows-1, 4) = MRC. Fields (4)
. Textmatrix (. Rows-1, 5) = MRC. Fields (5)
MRC. movenext
Loop
End

 

 

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.