Form Picture Lookup

thrasher

New Member
Joined
Mar 26, 2003
Messages
6
I have a database for my mp3 collection and would like to have a picture for each artist and album. The problem is I have hundreds of artists/albums and it would crazy to link all of the ole objects.

My question is how do I have "OLEBOUND10" display the picture associated with "TEXT1" as text1 says ="C:\Documents and Settings\Thrasher\Desktop\Database\Songs\" & [artist] & " - " & [title] & ".mp3"

Also, is there a way to play a song upon entry of a form/database?

Thanks a lot!
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Rather than using an OLE object use an Image conctroll and set it's path from code.
So if you have a field in the table that contains the file path you put it on the form (can be hidden) and use the forms Current event to show the picture.

Private Sub Form_Current()
On Error Resume Next
Me.imgVisual.Picture = Me.ImgPath
End Sub

This may show a loader as the picture changes but works quite well.

HTH


Peter
 
Upvote 0

Forum statistics

Threads
1,221,557
Messages
6,160,477
Members
451,650
Latest member
kibria

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top