Results 1 to 4 of 4

Thread: library project

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2009
    Posts
    1

    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????

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    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).

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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)

  4. #4
    PowerPoster Code Doc's Avatar
    Join Date
    Mar 2007
    Location
    Omaha, Nebraska
    Posts
    2,354

    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.
    Doctor Ed

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width