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

looping thru database results

Im trying to create a datagrid that will display an image instead of what is actually stored in the database. For instance if the result of a zodiac is leo, then show the leo image, or if it is cancer, show the cancer symbol, etc.. I am using a datagrid to show the results of the query but want to populate it with images instead of strings which is how they are stored in the database. Any ideas would be greatly appreciated or point me to a good tute on the subject. thanks

StatiX
Light Poster
33 posts since Aug 2006
Reputation Points: 10
Solved Threads: 2
 

are you asking about how to loop thru database ? i think like this

count = Me.DataSet.Table_Name.Count
        For i = 0 To count - 1
            m = Me.DataSet. Table_Name.Rows(i).Item("Column_name")
            Select Case m
                Case "Leo"
                  Display image of Leo in   Me.DataGrid1.Item(i, 0)
                  .
                  .
                  .
                                      etc 

            End Select
manal
Junior Poster
122 posts since Mar 2006
Reputation Points: 37
Solved Threads: 17
 

Exactly what I needed.. Thanks!

StatiX
Light Poster
33 posts since Aug 2006
Reputation Points: 10
Solved Threads: 2
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You