Add sound to your Access form events
Thursday, June 05, 2008 02:32 PM
It takes only a few simple steps to have Access play a sound for any form event. Find out how in this article.
Microsoft Access
Add sound to your Access form events
Would you like a sound to play each time a user opens or closes a form or clicks on a form control? Access lets you play a sound for any form event.
For example, to have a sound play when a form is opened, follow these steps:
- Open the Form in Design View.
- Press Alt + F11.
- Go to View | Project Explorer.
- Insert | New Module.
- Enter this code at the prompt:
Declare Function apisndPlaySound Lib "winmm" Alias "sndPlaySoundA" (ByVal filename As String, ByVal snd_async As Long) As Long Function Playsound(sWavFile As String) 'Purpose: Plays a sound. 'Argument: the fu11 path and file name. If apisndPlaySound(sWavFile, 1) = 0 Then MsgBox "The Sound Did Not Play!" End If End Function

- Press Alt + Q.
- On the form's Property sheet, click in the OnOpen event box on the Event tab.

- Click the Build button and then enter the code below at the prompt. (Be sure to use the full pathname to your sound file.)
Playsound ("C:I386Chimes.wav")

- Press Alt + Q.
Microsoft Word
Change the alignment of your numbered lists
Do your numbered lists look too close to the listed items? When you use the built-in left-aligned numbering styles, your list can look like this:
Changing the alignment of the numbers in those lists can make your documents easier to read. For example, when the list is centered-aligned, it looks like this:

To center-align a numbered list in Word 2002/2003, follow these steps:
- Select the numbered list.
- Right-click the list.
- Select Bullets And Numbering.
- Click the Customize button.
- Click the drop-down arrow in the Number Position box and select Centered.
- Click OK.

To center-align a numbered list in Word 2007, follow these steps:
- Select the Numbered list.
- On the Home tab, click the arrow of the Numbering button in the Paragraph group.
- Click Define New Number Format.
- Click the drop-down arrow of the Alignment box and select Centered.
- Click OK.

Microsoft Excel
Copy an Excel chart to the desired spot in a Word document
You want to place an Excel chart in the top-left corner of the first page of your Word document. However, you don't want to spend time adjusting it so that it doesn’t interfere with the rest of the page formatting. One solution is to create a table cell as a placeholder for the chart in your Word document.
Follow these steps:
- Open your Word document and insert a 2-inch high and 3-inch wide table in the top-left corner of your page.
- With the cell selected, click the No Border tool to remove the borders from the cell.
- Open the Excel workbook that contains the chart and select it.
- Resize the chart object to 2 inches by 3 inches. (For Excel 2007, in the Chart Tools Format tab, enter the placeholder table cell's height of 2 inches and width of 3 inches in the chart's Height and Width boxes.)
- Select the chart area and press Ctrl + C.
- Click in the table cell in the Word document, choose Paste Special from the Edit menu, select a Picture option, and click OK. (In Word 2007, press Alt + Ctrl + V, choose Picture (PNG), and then click OK.)
- Right-click the chart, choose Format Picture, and click the Layout tab. Under Wrapping Style, select In Line With Text. (In Word 2007, right-click the chart, choose Text Wrapping, and then click In Line With Text.)
The chart will appear in the top-left corner of the page as shown here:


» Blades for superior performance



There are currently no comments for this post.