Unformatted text preview:

The Registration DatabaseSample Problem Search by TWO fieldsComposite KeyAnswer to the problem on Building and RoomThe Registration DatabaseStu-Class info:•SSN FK•CourseID FK•Section FK•GradeStudent info:•SSN•Name•Address•Major•Cum hours•Cum pointsClass info:•Course ID FK•Section•Building•Room•Days•Start Time•End Time•No Enrolled•Inst SSN FKCourse info:•Course ID•Title•CreditInstructor info:•Instructor SSN•Instructor Name•E-mail•other stuff1:MM:11:MM: 1Sample ProblemSearch by TWO fieldsAssume the user has typed in a building in txtBuilding and a room in txtRoom. Print in picClasses the course ID and Section of all classes meeting in this building and room.This is an example of a two field search/query. The only thing difficult is the syntax for the query.Composite Key•strFind = "[Field 1] = '" & field1Value & "' and [Field 2] = '" & field2Value & "'”•strFind = “[Building] = '” & txtBuilding.text & “' and [Room] = '” & txtRoom.text & “'”Answer to the problem onBuilding and Room DIM strFind as String strFind = “[Building] = '” & txtBuilding.text & “'and [Room] = '” & txtRoom.text & “'” datClass.Recordset.FindFirst strFind Do While datClass.Recordset.NoMatch = False picClasses.print datStuClass.Recordset.Fields(“Course ID”); tab(20); datStuClass.Recordset.Fields (“Section”) datClass.Recordset.FindNext strFind


View Full Document

EIU CIS 3000 - VB1Composite

Download VB1Composite
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view VB1Composite and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view VB1Composite 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?