Page 270 - Open Soource Technologies 304.indd
P. 270
Event Driven Programming
Private Sub cmdAll_Click()
Adodc1.RecordSource = “SELECT * FROM book”
Adodc1.Refresh
Adodc1.Caption = Adodc1.RecordSource
End Sub
Now, run the program and when you click on the Display Author button, only the names of
authors will be displayed, as shown below:
and when you click on the Display Book Title button, on the book titles will be displayed, as
show below:
Figure 12.4: Selection of Title.
Lastly, click on the Display All button and all the information will be displayed.
Figure 12.5: View of Data.
264 LOVELY PROFESSIONAL UNIVERSITY