Add sounds to your Access form events
Thursday, June 25, 2009 01:49 PM
Access lets you play a sound for any form event. Find out how to do it in this step-by-step guide.
Microsoft Access
Add sounds 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 Excel
Quickly add a series to an existing Excel chart
Excel makes it easy to create a quick chart. You select the data and click the Chart Wizard button and a few clicks later, you have a great looking chart.
It seldom stops there though. It isn't uncommon at all to update the underlying data and subsequently need to update the chart.
For instance, if a chart displays sales for only the first three quarters of the year, eventually, you'll want to add the fourth quarter. You could recreate the chart but usually, you've done enough customizing that you won't want to start over from scratch.
Fortunately, adding a series to an existing chart is a simple copy task:
- Select the new data that you want to add to the chart. Don't select the entire worksheet--select only the new data. As you can see below, the existing chart's data consist of the first three quarters. To add the fourth quarter to the column chart, select just the fourth quarter data.
- Press [Ctrl]+C to copy the new data to the Clipboard.
- Select the chart.
- Press [Ctrl]+V to copy the new data from the Clipboard to the new chart. A simple copy and paste task updates the existing chart by adding the fourth quarter series.

Microsoft Word
34 timesaving mouse tricks for Word users
Keyboard shortcuts are a mainstay for most Word users who are trying to streamline their work. Even brand-new users start slinging around Ctrl+C and Ctrl+V soon after mastering the intricacies of scrolling.
But keyboard shortcuts are often nonintuitive and hard to remember. (What mnemonic would you use to recall that Ctrl+E centers document text or that Ctrl+T produces a hanging indent?)
That's where mouse shortcuts--the unsung hero of built-in functionality--can take up the slack. Users probably know the basic moves: Right-click on an item to display a shortcut menu, double-click to select a word, triple-click to select a paragraph.
But Word has quite a few additional mouse tricks up its sleeve. This overview will help you (and your users) learn some easily remembered techniques to gain quick access to a host of Word options.
Formatting |
|
| Action | Result |
| Double-click an indent marker on the horizontal ruler | Opens the Paragraph dialog box |
| Double-click the vertical ruler (in Print Preview) or the gray area of the horizontal ruler | Opens the Page Setup dialog box |
| Double-click a tab marker on the horizontal ruler | Opens the Tabs dialog box |
| Double-click the style area | Opens the Style dialog box. (To display the style area, make sure you're in Normal view, choose Tools | Options | View, and enter a value in the Style Area Width text box.) This is a particularly neat trick for those who prefer setting style options in a dialog box instead of in the task pane. |
| Double-click a section break mark (visible in Normal view) | Opens the Page Setup dialog box with This Section selected in the Apply To drop-down list. "This" refers to the section above the section break mark you clicked on. |
| Double-click a paragraph properties mark | Opens the Line And Page Breaks tab in the Paragraph dialog box. The mark is a small black square that appears to the left of a paragraph that has the Keep Lines Together, Page Break Before, or Keep With Next option enabled. (The display of Formatting Marks must be turned on to see these marks; you may need to click Show/Hide ¶ on the Standard toolbar to turn on the display.) |
| Double-click a number in a numbered list | Opens the Numbered tab in the Bullets And Numbering dialog box |
| Double-click a bullet in a bulleted list | Opens the Bulleted tab in the Bullets And Numbering dialog box |
Objects and pictures |
|
| Action | Result |
| Double-click the frame of a text box | Opens the Format Text Box dialog box |
| Double-click an AutoShape | Opens the Format AutoShape dialog box |
| Double-click a WordArt object | Opens the Edit WordArt dialog box |
| Double-click an embedded object, such as an Excel worksheet or PowerPoint slide | Opens the object for editing |
| Double-click a picture | Opens the Format Picture dialog box |
| Double-click a control (check box, command button, etc.) | Launches the VB Editor and open the properties and code window for that item |
Miscellaneous tasks |
|
| Action | Result |
| Hold down Ctrl and click within a sentence | Selects sentence |
| Hold down Ctrl and drag selected text or an object | Creates a copy of the text or object |
| Double-click the split bar at the top of the horizontal scroll bar | Splits the window into two panes; double-click the top border of the lower pane to remove the split |
| Double-click in the header or footer area (in Print Layout view) | Activates the header or footer; double-click in the main text area to return to it |
| In Print Layout view, click between pages | Shows or hides the white space between them |
| Double-click an unused area beside any toolbar | Displays the Customize dialog box |
| Right-click on any toolbar | Displays the toolbars list |
| Double-click a footnote/endnote marker | Jumps to the corresponding footnote/endnote (and vice versa) |
| Double-click the top border of the Reviewing Pane | Closes the pane and returns you to the main text area |
| Double-click the right border of the Document Map or Thumbnails pane | Closes the pane |
| Double-click the document title bar | Toggles between maximized and restored window size. (Little-known related trick: The same thing happens if you double-click the gray square at the intersection of the horizontal and vertical scroll bars.) |
| Double-click a Move Table Column marker (those little dotted squares you see on the horizontal ruler when you're in a table) or the Table Move Handle (the four-headed arrow that appears at the top-left corner of a table in Print Layout view) | Opens the Table Properties dialog box |
| Click the Table Move Handle | Selects the table |
| Double-click the plus symbol next to a heading in Outline view | Expands or collapses the heading's subordinate text |
Status bar tools |
|
| Action | Result |
| Double-click the status bar anywhere to the left of the REC item | Opens the Go To dialog box |
| Double-click REC on the status bar | Opens the Record Macro dialog box |
| Double-click TRK on the status bar | Turns track changes on and off. (Right-clicking on TRK will bring up a shortcut menu of additional options.) |
| Double-click EXT on the status bar | Turns extend selection mode on and off |
| Double-click OVR on the status bar | Turns overtype mode on and off |
| Double-click the Spelling And Grammar Status icon on the status bar | Checks document spelling and grammar. (Right-clicking will bring up a shortcut menu of additional options.) |





There are currently no comments for this post.