954,517 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Need Help here, listbox to textbox along with picture

i'm new using VB 2008. so i hope somebody could help me. my problem is i want whenever the listbox is checked then the info in the listbox can be shown in multiple textbox along with picture. i used MS Access as my database. here i attach my code. i hope someone could teach me what's wrong and so on. thanks

Attachments Library.zip (332.59KB)
ExtremeGTSlayer
Newbie Poster
2 posts since Mar 2009
Reputation Points: 10
Solved Threads: 0
 

Just use the code tags to show your code, so we don't have to download it.

crazyhorse09
Junior Poster in Training
62 posts since Mar 2009
Reputation Points: 19
Solved Threads: 7
 

hm, thanks for the response. when load form, i call the ShowBookLibrary and only book title showing in listbox

'Display the book title only
Private Sub ShowBookLibrary(ByVal conn As OleDbConnection)
Dim select_cmd As New OleDbCommand("SELECT * FROM Library", conn)
Dim reader As OleDbDataReader = select_cmd.ExecuteReader()
IstLibBook.Items.Clear()
Do While reader.Read()
IstLibBook.Items.Add(reader.Item("Title").ToString)
Loop
reader.Close()
End Sub


in my database(Library) have columns --> Title, Author, BookStatus, BookDue
so, this is where i'm stuck.

Private Sub IstLibBook_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles IstLibBook.SelectedIndexChanged
BookTitle.Text = CStr(IstLibBook.SelectedItem)
'Author.Text
'BookDue.Text
'BookStatus.Text
'GetPicture
End Sub


what am i suppost to do to make the other textbox showing the info about the book from the database?

ExtremeGTSlayer
Newbie Poster
2 posts since Mar 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You