-
library project
i need to do a project dont know yet how to post a new forum so plz help here
there should b 2 options radiobuttons fiction and non fiction
when i select fiction the drop down menu's subjects change into romance religion etc similarly if i select non fiction the subjects of drp down menu should change into biography science etc
now when i click fiction and the any subject from drop down menu the text area below should display the books and authors name of that particular subject????
-
Re: library project
Welcome to VBForums :wave:
I have moved your question from the unrelated Thread you posted it to, in to its own Thread
When you have a new question, please use the "New Thread" button. To reply to an existing thread use the "Post Reply" button (or the "quick reply" area below the posts).
-
Re: library project
What kind of a database are you planning on storing all these category names and book titles (as well as author names, ISBN numbers, library location numbers etc etc)
-
Re: library project
Welcome aboard! :wave:
I used a list box coupled with a control array of two command buttons:
Code:
Dim FicSubj() As String, NonFicSubj() As String
Dim NumSubj() As Integer
Private Sub Command1_Click(Index As Integer)
List1.Clear
If Index = 0 Then ' Display Fiction subjects
For I = 0 To NumSubj(Index)
List1.AddItem FicSubj(I)
Next
Else ' Display Nonfiction subjects
For I = 0 To NumSubj(Index)
List1.AddItem NonFicSubj(I)
Next
End If
End Sub
Private Sub Form_Load()
ReDim NumSubj(1)
NumSubj(0) = 3
NumSubj(1) = 4
ReDim FicSubj(NumSubj(0)), NonFicSubj(NumSubj(1))
' Fiction Subjects
FicSubj(0) = "Romance"
FicSubj(1) = "Religion"
FicSubj(2) = "Science Fiction"
FicSubj(3) = "Adventure"
'Nonfiction Subjects
NonFicSubj(0) = "Biography"
NonFicSubj(1) = "Science"
NonFicSubj(2) = "History"
NonFicSubj(3) = "Math"
NonFicSubj(4) = "Government"
' Display Fiction Subjects
Command1(0).Value = True
End Sub
This should get you started. You can supply authors' names within the subject arrays or as separate arrays and concatenate the strings within the list box.