Tech

Guides
 

Add sound to your Access form events

By Mary Ann Richardson, Special to ZDNet Asia
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:

  1. Open the Form in Design View.
  2. Press Alt + F11.
  3. Go to View | Project Explorer.
  4. Insert | New Module.
  5. 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

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

  1. 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")

  1. 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:

  1. Select the numbered list.
  2. Right-click the list.
  3. Select Bullets And Numbering.
  4. Click the Customize button.
  5. Click the drop-down arrow in the Number Position box and select Centered.
  6. Click OK.

To center-align a numbered list in Word 2007, follow these steps:

  1. Select the Numbered list.
  2. On the Home tab, click the arrow of the Numbering button in the Paragraph group.
  3. Click Define New Number Format.
  4. Click the drop-down arrow of the Alignment box and select Centered.
  5. 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:

  1. Open your Word document and insert a 2-inch high and 3-inch wide table in the top-left corner of your page.
  2. With the cell selected, click the No Border tool to remove the borders from the cell.
  3. Open the Excel workbook that contains the chart and select it.
  4. 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.)
  5. Select the chart area and press Ctrl + C.
  6. 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.)
  7. 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:




WORTHWHILE?

0

0 votes
Blog

Talkback 0 comments

There are currently no comments for this post.

Guest user

Guest user

Level: 
Joined: —
Already a member? Log in »



 

Loading...

Whitepapers / Case Studies

Downloads

Microsoft Office Suite News


Tech Jobs Now!

Tags

  1. access
  2. backup
  3. data
  4. date
  5. determine
  6. excel
  7. feature
  8. install
  9. keep
  10. list
  11. mailing
  12. microsoft
  13. mobile
  14. processes
  15. project
  16. security
  17. server
  18. service
  19. should
  20. sql
  21. tasks
  22. text
  23. time
  24. title
  25. use
  26. ways
  27. what
  28. windows
  29. wizard
  30. word