|
-
May 28th, 2009, 08:18 AM
#1
Thread Starter
New Member
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????
-
May 28th, 2009, 09:44 AM
#2
Re: library project
Welcome to VBForums 
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).
-
May 28th, 2009, 10:58 AM
#3
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)
-
May 28th, 2009, 02:02 PM
#4
Re: library project
Welcome aboard! 
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|