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