• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

12. Automation > 12.1. Play an Embedded Sound File from Within an Application

12.1. Play an Embedded Sound File from Within an Application

Problem

Your application stores WAV files as OLE objects within a table, and you’d like to be able to play them on demand. You know that users can double-click on the icon in a form to play the sounds, but you’d like some control over this. Is there a way to play one of these embedded sounds when you need to?

Solution

Access gives you substantial control over the use of OLE objects. Using the Action property of the control that’s displaying the OLE object, you can tell the object to activate itself, copy itself to or paste itself from the Windows clipboard, update its data, and close or delete itself. The Action property can be used for bound or unbound OLE objects and graphs, too. You can also call up the Insert Object or Paste Special dialog to place data into the control. This solution uses a bound OLE field, but it works just as well with an unbound object on a form.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint