April 2, 2008

10 annoying Word features (and how to turn them off)

Date: July 9th, 2007

Author: Jody Gilbert

This information is also available as a PDF download.

One of the most common complaints about Microsoft Word is its insistence on taking control of the wheel. Many users get completely blindsided by some of Word’s automatic changes, and even the more experienced among them often just live with Word’s shenanigans because because they don’t know how to disable them.

If you’ve gotten more than your share of support calls from users trying to wrestle Word into submission (or pulled out your own hair on a few occasions), the list below will help you quickly cut Word down to size.

A few things to keep in mind: First, many of the options you need are located in the AutoFormat As You Type tab. A similar set of options exists in the AutoFormat tab — but disabling those won’t do you any good with Word’s on-the-fly changes. Users sometimes don’t make that distinction and can’t understand why the changes are still happening after they thought they’d turned off the necessary settings.

Second, some of these options may actually sound appealing to your users but might currently be disabled. You can use this list to help them selectively activate the features they want, not just to turn things off. It’s not always the features themselves that are annoying — it’s just not knowing how to control them.

And finally, Word 2007 offers the same feature set described here, but accessing the options is a little different. The section at the bottom explains how to find them in that version.

Cheap solution: Undo
If you haven’t had a chance to disable an automatic feature (or you want to leave it enabled and override it only occasionally), remember that pressing Ctrl+Z or clicking the Undo button right after Word makes a change will undo that action. So, for instance, if Word inserts a smart apostrophe where you want to retain the straight character to denote measurement, just hit Undo to straighten it back out.

The annoyances

Behavior How is generic viagra safe to turn it off
#1: Word creates a hyperlink when you type a Web page address. Go to Tools | AutoCorrect Options and select the AutoFormat As You Type tab. Under Replace As You Type, deselect the Internet And Network Paths With Hyperlinks check box and click OK.
#2: Word changes capitalization of text as you type it. A host of settings can trigger this behavior. Go to Tools | AutoCorrect Options and select the AutoCorrect tab. Here, you can deselect whichever check boxes govern the unwanted actions:

  • Correct Two Initial Capitals
  • Capitalize First Letter Of Sentences
  • Capitalize First Letter Of Table Cells
  • Capitalize Names Of Days
  • Correct Accidental Use Of Caps Lock Key
#3: Word inserts symbols unexpectedly, such as trademark or copyright characters or even inserts an entire passage of text. Go to Tools | AutoCorrect Options and select the AutoCorrect tab. This time, find the Replace Text As You Type check box. Either deselect it to suppress all replacements or select and delete individual items in the list below it.It might make sense to keep the feature enabled and selectively remove items, since the list includes scores of common misspellings that are actually nice to have corrected for you.
#4: Word superscripts your ordinal numbers, such as 1st and 2nd. Go to Tools | AutoCorrect Options and click the AutoFormat As You Type tab. Deselect the Ordinals (1st) With Superscript check box and click OK.
#5: Word converts fractions into formatted versions. Go to Tools | AutoCorrect Options and click the AutoFormat As You Type tab. Deselect the Fractions (1/2) With Fraction Character option.
#6: Word turns straight apostrophes and quote marks into curly characters. Go to Tools | AutoCorrect Options and click the AutoFormat As You Type tab. Deselect the Straight Quotes With Smart Quotes check box and click OK.
#7: When you try to select a few characters within a word, the highlight jumps to select the entire word. Go to Tools | Options and click the Edit tab. In the right column under Editing Options, deselect the When Selecting, Automatically Select Entire Word check box and click OK.
#8: When you type three or more hyphens and press Enter, Word inserts a border line. Go to Tools | AutoFormat and select the AutoFormat As You Type tab. Deselect the Border Lines check box and click OK.A similar option exists for inserting a table, but it’s generally not going to sneak up on you: When the Tables check box is selected, typing a series of hyphens and plus marks before pressing Enter will insert a table (with the hyphens representing cells). You can turn off that option if you think you might stumble into an unwanted table insertion.
#9: Word automatically adds numbers or bullets at the beginning of lines as you type them. There are two flavors of this potential annoyance. First, if you start to type something Word thinks is a bulleted list (using asterisks, say) or type 1, a period, and some text, it may convert what you type to bulleted or numbered list format when you press Enter.To prevent this, go to Tools | AutoCorrect Options and select the AutoFormat As You Type tab. Then, deselect the Automatic Bulleted List and/or Automatic Numbered list check boxes and click OK.A related aspect of this behavior is that once you’re entering automatic list items, pressing Enter will perpetuate it — Word will keep inserting bullets or numbers on each new line. To free yourself from this formatting frenzy, just press Enter a second time, and Word will knock it off.
#10: When you type hyphens, Word inserts an em dash or an en dash. If you type a word, two hyphens, and another word (no spaces), Word will convert the hyphens to an em dash. If you type a space before and after the hyphens, it will convert them to an en dash.To disable this feature, Go to Tools | AutoCorrect Options and select the AutoFormat As You Type tab. Deselect the Hyphens (–) With Dash (-) check box and click OK.

Bonus fixes

Word may cause your users some additional grief in various other ways besides automatic behaviors. It goes a little something like this:

User: My document if full of weird code stuff and my pictures are gone.
Culprit: Field code display has been toggled on.
Solution: Suggest that the user press Alt+F9 to restore the display of field code results.

User: I’m seeing gray brackets around a bunch of my text.
Culprit: Bookmark display has been enabled.
Solution: Go to Tools | Options and select the View tab. Then, under the Show options, deselect the Bookmarks check box and click OK.

User: I’m typing and everything in front of the cursor is disappearing.
Culprit: The evil Overtype mode has been activated.
Solution: Go to Tools | Options and select the Edit tab. Then, under Editing Options, deselect the Overtype Mode check box and click OK. (It might be quicker to double-click OVR on the status bar, if you can point the user to it.)

User: Everything’s gone, all my toolbars and menus and everything — there’s nothing here but text.
Culprit: The user has landed in Full Screen view.
Solution: Direct the user’s attention to the Close Full Screen View button at the bottom of the window (depending on the version) or tell them to press Alt+V to display the View menu. They can then select Full Screen to turn off that view mode and return to familiar territory.

Accessing the options in Word 2007

All the settings we’ve discussed here are accessible via the Office button in Word 2007:

  • To get to the AutoCorrect dialog box, click the Office button, select Word Options at the bottom of the menu, and choose Proofing from the pane on the left. In the pane on the right, click the AutoCorrect Options button, and Word will display the AutoCorrect dialog box containing the AutoCorrect and AutoFormat As You Type tabs.
  • To get to editing options, click the Office button, select Word Options at the bottom of the menu, and choose Advanced from the pane on the left. Word will display Editing Options at the top of the pane on the right. In that section, you’ll find the When Selecting, Automatically Select Entire Word check box and the Use Overtype Mode option. If you scroll down to the Show Document Content section, you’ll find the Show Bookmarks check box.
  • The successor to Full Screen view in Word 2007 is Full Screen Reading view. Users shouldn’t get stuck there, but if they do, the Close button in the upper-right corner of the window will take them back to Print Layout view.
Permalink • Print • Comment

10+ tips for working efficiently in Access’ Query Design window

Takeaway: If you create Access queries, you probably know your way around the Query Design window. But there are some not-so-obvious tricks you can use to work more efficiently, maintain accuracy, and ensure database integrity.

This article is also available as a PDF download.

To create an Access query, you use the Query Design window. You specify a few data sources and fields, add a criteria expression or two, and perhaps specify a sort order. What you might not realize is that there's more to working in this window than just creating a query. Working efficiently in this environment can help you maintain accuracy and database integrity.

#1: Mastering the terminology

Queries come with a few terms you might not associate with their graphic counterparts. With that in mind, here are a few environmental terms you might read in articles and documentation:

  • Design view — This is the window you use to design a query. You might also see this window called the Query Design window or the Query Builder. The Query Builder is actually a different interface from the Query Design window. Access displays this window when you define a query as a control's data source.
  • Datasheet view — This is the table-looking view of a query's resulting recordset. There are other views, but you'll usually work with Datasheet view.
  • QBE grid — This is the lower pane in the Query Design window's graphic interface. (QBE stands for query by example.) Use the bottom pane to specify the fields upon which the query acts.

#2: Adding fields to the QBE grid

The upper pane of the Query Design window (Design view) displays a query's data sources. If you want the query to act upon a field, you must drag that field to the QBE grid (the lower pane). Fortunately, Access supports a number of ways to do this:

  • The most obvious way is to type the field's name into a Field cell. As you type, Access selects the most appropriate field name from the data source. If there's more than one table and the same field name occurs in both, you must also specify the source table in the Table cell. If you don't, Access defaults to the first table (left to right in the upper pane) that contains the field.
  • Perhaps the most efficient and trouble-free method is to select the field from the Field cell's drop-down list. Doing so eliminates errors. If there are multiple tables, the list displays all the fields from all the tables, using the table.field format, which can make this method a little more difficult to use.
  • You can use the drag-and-drop method to drag a field from a field list in the upper pane to a column in the QBE grid. In the field list, click the field you want to add to the query. Then, while holding down the mouse, drag the field to the QBE grid.
  • A quick double-click will also do the trick. Simply double-click a field to add it to the QBE grid.

If you enter a field name that doesn't exist or you create an ambiguous reference, Access won't run the query, so you don't have to worry about this type of mistake fouling up a query's results. However, you will waste time finding and correcting the error. For this reason, it's best to avoid typing field and table names.

#3: Quickly adding all the fields to the QBE grid

Some queries require all the fields from a data source. When this is the case, you could use the asterisk character (*) in the QBE grid to represent all of the fields. You'll find it at the top of each field list. However, you should avoid using the asterisk character because it has limits. For instance, you can't include an aggregate function or run a Totals query against the asterisk character. The limits make perfect sense, but the asterisk character has a way of turning up an error when you least expect it.

Fortunately, there's another easy way to add all fields to the QBE grid. Double-click the field list's title bar to select all of the fields. Then, simply drag the entire block of fields to the grid. Access will fill the grid in the order the fields occur in the list.

#4: Dragging contiguous and noncontiguous blocks

You can drag a contiguous or noncontiguous block of fields to the grid. To select a contiguous block of fields, click the first field name in the block. Then, hold down the [Shift] key and click the last. Access will select the two clicked fields and all the fields in between. Once Access selects the block, drag it to the QBE grid. Selecting a noncontiguous block is similar. Hold down the [Ctrl] key and click each field name. When you're finished, drag the block to the QBE grid. When dragging multiple fields to the QBE grid, Access always inserts the fields in list order.

#5: Having it all

Although you can easily add all the fields in a data source to the QBE grid, and ultimately, to your query, you probably shouldn't. Add only the fields that your query needs: fields that are part of a criteria expression, fields you need to sort or group by, and fields you need to view.

Keep in mind that bound objects have access to only the data specified in the query. If bound objects need more data, set the query's Output All Fields property to Yes. Then, any bound object will have access to all of the underlying data source's fields. To access this property, click the Properties button in Design view.

#6: Setting query properties

In Design view, you can click the Properties button to display a list of query properties. Alternately, you can right-click the query window's background and choose Properties from the resulting submenu to display the same list. Although the latter method requires an extra click, it's good to know you can access properties this way in case the Query Design toolbar isn't available.

#7: Reading the Jet SQL behind your queries

Access communicates with Jet using Jet SQL. The Query Design window is just a graphical interface that allows you to create the appropriate SQL statement, without actually writing the statement yourself. From the choices you make in the QBE grid, Access creates the SQL statement the Jet engine requires to run the query. If you'd like to see the SQL behind your queries, choose SQL View from the View button on the Query Design toolbar. The quickest way to learn Jet SQL it is to read it.

#8: Combining nested queries

You probably know that you can base one query on another. This arrangement is known as nested queries. Often, you can replace nested queries with a subquery — a SQL statement that contains a second SQL query. However, writing a subquery from scratch can be difficult, even if you're familiar with Jet SQL.

Fortunately, you can use the SQL View window (#7) to help create a subquery. To get started, view the first query in SQL View and copy it to the Clipboard. Next, open the second query and add the WHERE keyword (usually at the end of the statement). Then, paste the first query beneath the new WHERE keyword and enclose the entire copied SQL statement in parentheses. Replace the query is generic viagra real reference with the appropriate table name(s). Now, this method isn't foolproof for every subquery, but it's a good start.

#9: Viewing results without running the query

Running a SELECT query retrieves and displays data, but it doesn't change underlying data. For this reason, clicking Run to see the results is a safe choice. But that won't always be the case. If you run an action query — an Update, Delete, or even an Append query — at the wrong time, you could seriously compromise your application.

Fortunately, you can test an action query's results without actually committing its changes. Simply choose Datasheet View from the View menu on the Query Design toolbar. Doing so lets you see what the query will do if you actually run it.

If, for some reason, Datasheet View isn't available, run the action query as a Select to view the results. Once you're sure the query does the job you want, change the query type and run it as an action query.

#10: Building relationships

To create a relationship between two tables, you probably use the Relationships window (click Relationships on the Database toolbar). The resulting window displays existing relationships and allows you to create new ones. You can also create and manipulate relationships in the Query Design window. Simply drag related fields between the field lists in the upper pane. Then, right-click the resulting join line to modify the relationship, if necessary. However, you must remember that any relationship you create this way is valid for that query only. This relationship will not affect any other queries.

#11: Rearranging columns

Order matters in some queries. For instance, if you specify a sort order for more than one field, Access sorts from left to right. Sometimes you must rearrange columns in the QBE grid to get the sorted or grouped results you want. To do so, click the thin bar at the top of the column you want to move to select the entire column. Then, click the selected column, hold down the mouse, and drag the column to its new position. When you close the query, Access will prompt you to save changes you made to the layout. Click Yes only if you want to retain the new column position.

#12: Using SQL View to build and debug

The SQL window (#7) doesn't just display SQL statements. Take full advantage of this view to build and debug SQL statements you execute via code. First, create a SQL statement you intend to use in code in the Query Design window. Then, copy the statement from the SQL View window to a code module. You can also use SQL View to debug SQL statements you're already using in code. Copy the erring statement from the module to the SQL View window and run it. Generally, this window displays a much more helpful error message than the coding environment. Run the statement via the SQL View window as many times as necessary to correct the problem. Then, copy it back to the code module.

 


Susan Sales Harkins is an independent consultant and the author of several articles and books on database technologies. Her most recent book is Mastering Microsoft SQL Server 2005 Express, with Mike Gunderloy, published by Sybex. Other collaborations with Gunderloy are Automating Microsoft Access 2003 with VBA, Upgrader's Guide to Microsoft Office System 2003, ICDL Exam Cram 2, and Absolute Beginner's Guide to Microsoft Access 2003, all published by Que. Currently, Susan volunteers as the Publications Director for Database Advisors. You can reach her at ssharkins@setel.com.

Permalink • Print • Comment

10+ keyboard shortcuts for speeding your work with Excel data

Date: October 5th, 2007

Author: Jody Gilbert

Shortcuts can save you a considerable amount of time when you’re entering or modifying data in a worksheet — but only if you can remember them. This list offers ingredients in viagra a quick reminder of some old standbys, along with a few shortcuts that are less well known but equally useful.

A comprehensive list of Excel shortcuts is available as a PDF download.

Action Shortcut
Complete an entry and move to the next cell Enter
Insert a new line within a cell Alt+Enter
Enable editing within a cell F2
Fill selected cells with an entry you typed in one cell Ctrl+Enter
Cancel an entry Esc
Fill data down through selected cells Ctrl+D
Fill data through selected cells to the right Ctrl+R
Create a name Ctrl+F3
Insert a hyperlink Ctrl+K
Insert the current date Ctrl and ; (semicolon)
Insert the current time Ctrl and : (colon)
Delete from the insertion point to the end of the line Ctrl+Delete
Add blank cells Ctrl and Shift+ (plus)
Delete selected cells Ctrl and – (hyphen)
Create a chart from a range of data F11

Permalink • Print • Comment

10 obscure Word tricks that can expedite common chores

Date: July 10th, 2006

Author: Jody Gilbert

Over the years, successive versions of Word have introduced some solid innovations, some mind-boggling changes-for-change’s-sake, and a few usability-crushing “enhancements.” But through it all, one thing has remained constant: Buried within Word info viagra are lots of cool tricks that not too many users have discovered. These are small things–shortcuts that, in some cases, may not look much more efficient than pulling down a menu and heading for the dialog box you need. But if you perform a certain task a thousand times a week, being able to bypass some steps or automatically slap a change into a document without having to stop and think about it can be a welcome convenience. Depending on how you use Word, I’m betting you (or your users) will get addicted to one or two of these tricks.

This entry originally appeared as an article and as a PDF download. We’re presenting it here as well so that we can build a “10 things” archive.

#1: Move table rows up or down

This tip is probably most useful when you’re working in a table, although you can use it to reorder paragraphs outside a table, too. Let’s say you decide you want the third row of a table to be the top row. Just click within the third row, hold down [Alt][Shift] and press the up arrow key twice. Each time you press the arrow key, Word will move the row up one. You can select multiple rows to move them as a block, and you can use the down arrow key if you want to move text down instead of up.

Using this shortcut gets a little tricky if you’re moving big pieces of text outside a table. It’s easy to lose track of what’s being relocated where, and you might find it easier to take a standard cut-and-paste approach in those situations. But when the text is small and manageable, the shortcut is fairly handy. For example, if you need to move an item up or down within a bulleted or numbered list, you can just click in the item’s paragraph and use the [Alt][Shift] and arrow key combo to move the item to the desired spot.

#2: Go back to your last editing location when you open a document

One of the confounding things about Word is that when you reopen a document you’ve been working on, it puts you back at the top of the document. Unlike Excel, which takes you to the spot where you left off last time, Word’s short-term memory always wants to start you off at the beginning again. You can work around this if you press [Shift][F5] as soon as the document opens. [Shift][F5] is the Go Back shortcut, which cycles you between your four most recent edits during a Word session. But if you can remember to hit it immediately after opening a document, Word will jump to the last thing you changed before saving and closing that doc.

#3: Save changes to all open documents at one time

This simple technique comes in handy when you’re working in multiple documents and want to make sure you’ve saved your changes to all of them. I actually use it most often when I’ve made a change to a template and want a quick way to save that change on the fly (before I’ve had a chance to forget I made a change I want to keep). All you have to do is press the [Shift] key and pull down the File menu. Word will add the Save All command to the menu, above the Save As command. Just choose Save All and Word will prompt you to save each document (or template) that has any unsaved changes. This is more efficient than having to navigate to each document individually and click Save.

#4: Make a vertical text selection

Here’s a trick that seldom appears on the shortcut lists. Most of the time, we select text horizontally–a word, a series of words, a paragraph–from left to right or vice versa. But occasionally, the selection has to be vertical. For instance, suppose you wanted to delete the leading characters in Figure A.


To make a vertical selection, hold down [Alt] as you drag down through the text you want to highlight. Figure B shows the column of unwanted characters selected using this technique. Hit [Delete] and bam, they’re gone.

Although we selected text at the beginning of the lines in this example, you can make vertical selections anywhere on the page.


Update: Some users have reported that the Research pane appears when they try this selection technique. Here’s the secret: Release the [Alt] key before you let up on the mouse button. Word should retain the selection. If you hold down [Alt] but release the mouse button, Word thinks “[Alt]-click” and opens the Research pane in response.

#5: Quickly add a series of numbers

There are plenty of tools you can rely on to perform sophisticated or complex calculations. But Word offers a command that can be handy when you just need to sum a few numbers without dragging out another application. The command is Tools Calculate, and although it doesn’t appear on any toolbars, it’s easy to add.

  1. Choose Tools | Customize (or double-click an empty spot on any toolbar) to open the Customize dialog box.
  2. Click the Commands tab and choose All Commands from the Categories list box.
  3. Click in the Commands list box and scroll down to select ToolsCalculate (Figure C).
  4. Drag the ToolsCalculate item to the toolbar where you want it to appear.
  5. Click Close to close the Customize dialog box.


Once you have access to the Calculate command, here’s how you use it. Simply highlight a series of numbers (either horizontally or vertically) and click your Tools Calculate button. Word will display the sum in the status bar, as shown in Figure D. It will also place that sum on the clipboard, so if you need to paste it into a document, just click in the desired spot and press [Ctrl]V or click Paste.


It’s important to note that the Calculate command works differently from the AutoSum button on the Tables and Borders toolbar. To use AutoSum, you have to be in an empty cell and then click the button to insert a formula that will add the numbers in the cells above or to the left of the current cell. It’s a sort of light-duty version of Excel’s =Sum() function. By contrast, the Calculate command gives you a quick total without requiring you to make a place for the results in your document.

#6: Gain fast access to formatting/layout options

If you spend a fair bit of time hopping into dialog boxes to tweak the appearance of your text or documents, there are some double-click tricks you might find useful. Here’s a sampling of the most common ones. (For a more comprehensive list, see “34 timesaving mouse tricks for Word users.”)

  • To open the Page Setup dialog box, double-click on the horizontal or vertical ruler.
  • To open the Paragraph dialog box, double-click on an indent marker on the horizontal ruler.
  • To access bullet or number options, double-click on a bullet character or number in a numbered list.
  • To access AutoShape options, double-click on an AutoShape.
  • To open the Table Properties dialog box, double-click the 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).

#7: Use Replace All to globally reformat text

Most users know how to use search and replace features to make certain types of text replacements on a case-by-case basis or throughout a document. But not everyone appreciates the power and versatility of the Replace All option when it comes to adjusting formatting. Here are just a couple of examples.

First, let’s say you’ve received a document in which someone went a little crazy with italics. Instead of manually removing the formatting from each occurrence:

  1. Choose Edit | Replace.
  2. Leave the Find What and Replace With text boxes blank.
  3. Click in the Find What text box and press [Ctrl]I.
  4. Click in the Replace With text box and press [Ctrl]I twice. This will set things up to replace all instances of italicized text with a nonitalicized version (Figure E). (Note: You can click Format | Font in the Find And Replace dialog box to access the corresponding options from a list box, but the [Ctrl]I method is a lot faster.)
  5. Click Replace All to unitalicize your document text.


Now suppose you have a document that contains scores of paragraphs that are formatted with some ugly custom style used by another department or external partner. You need the text formatted with your own standard Normal style instead. To make this change throughout the document:

  1. Choose Edit | Replace and click More (if necessary) to expand the dialog box.
  2. Click in the Find What text box and click Format | Style. Choose the name of the ugly style from the Find Style list box and click OK.
  3. Click in the Replace With text box and again click Format | Style. This time, choose Normal from the Find Style list box and click OK. Figure F shows these specifications ready to go.
  4. Click Replace All and Word will apply your Normal style to all the paragraphs carrying the style you want to get rid of.


#8: Quickly transfer formatting from one piece of text to another

Word offers a button called Format Painter that provides a slightly clunky way to copy the formatting from one piece of text and then apply it to another piece of text. You select the text whose formatting you want to transfer, click Format Painter, and then select the text you want to reformat. If you have several pieces of text scattered throughout the document that you want to reformat in this fashion, you can double-click Format Painter and then use the little paintbrush mouse pointer to “paint” the formatting onto those pieces of text. But then you have to turn it off (click the button again) so that you can go back to working in the document. And Format Painter will forget the formatting specs it just transferred for you.

A better approach is to use a shortcut that copies formatting characteristics and then remembers them until you close the document. That way, when you come across other pieces of text that need that particular set of formatting attributes, you can use this trick to instantly apply them.

The shortcuts for this technique are easy to remember because they’re cousins to ordinary copy and paste ([Ctrl]C and [Ctrl]V). To copy text formatting, select the desired text and press [Ctrl][Shift]C. To paste that formatting onto other text, select that text and press [Ctrl][Shift]V. If you select part of a paragraph, you’ll be transferring character formats (bold, point size, font, etc.). Select an entire paragraph, you’ll transfer paragraph formats (line spacing, alignment, indents, etc.) as well.

#9: Duplicate selected text or objects using the mouse

This is my favorite technique for copying drawing objects and graphics because you can copy them and drag them into position in one step. Using ordinary copy and paste is often a crap shoot, because objects tend to paste themselves in strange locations depending on the layout options of the original object.

To use this technique, click on the item you want to copy (it can be a selection of text or an object in a document) and hold down [Ctrl] so that the mouse pointer turns into a plus sign. Then drag the item–it will become a copy of the item–to the spot where you want it to go. Figure G shows this technique in progress.


#10: Create a shortcut to launch Word using a particular template

Ordinarily, Word starts up by opening a new Normal.dot document. But if you routinely create documents based on some other template, a better starting point might be to launch Word using the template you actually need. One easy way to accomplish this is to create a desktop shortcut.

You’ll need to know the path to the Winword.exe program (for example, the default location for Word 2003 is C:\Program Files\Microsoft Office\Office11; for Word XP, it’s C:\Program Files\Microsoft Office\Office10; and for Word 2000, it’s C:\Program Files\Microsoft Office\Office).

You’ll also need the path to the template you want to use on startup. If it’s one of Word’s built-in templates, look in C:\Program Files\Microsoft Office\Templates\1033. If it’s a custom template, the default spot is C:\Documents and Settings\Username\Application Data\Microsoft\Templates. (If you’ve used Tools | Options | File Locations to specify a different folder for the User Templates item, you’ll need to use that path instead.)

Let’s walk through the process of creating the shortcut. We’ll assume that we’re using Word 2003 and that we have a custom template called DailyReport.dot located in the default folder for custom templates.

  1. Right-click on the desktop and choose New | Shortcut.
  2. In the Target text box, type the path to the Word program: “C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE”. You need the quote marks because there are spaces in the pathname.
  3. Type a space, followed by the startup switch we want, /t.
  4. Enter the path to the template, also in quotes: “C:\Documents and Settings\Username\Application Data\Microsoft\Templates\DailyReport.dot”. You don’t need a space between the switch and this path. The full entry for the Target text box will look like this:

“C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE” /t”C:\Documents and Settings\Username\Application Data\Microsoft\Templates\DailyReport.dot”

  1. Click Next, enter a name for your shortcut, and click Finish.
Permalink • Print • Comment

10+ tips for designing flexible and efficient Access tables

Date: March 8th, 2007

Author: Susan Harkins

Access stores one of your most important assets–your data–in tables. Now, truthfully, the table you see onscreen is just a graphic representation, but you use this representation to determine how the rest of your database uses and reacts to your data. For this reason, it’s important to spend time up front assigning the appropriate properties and data types to suit the data. If the tables aren’t right, everything else is suspect.

This entry originally appeared as an article and as a PDF download. We’re presenting it here as well so that we can build a “10 things” archive.

# 1: Use table level properties to increase efficiency

Access tables offer several properties that remain with the data. You set the property just once, at the table level, and bound objects inherit those settings:

  • Format: Determines how Access displays the data.
  • Caption: Access displays this text in a control’s corresponding label box.
  • Input Mask: Forces users to enter data in a specific order or manner.
  • Default Value: Access automatically populates a control with this value for new records.
  • Description: Documents at the table level. Access displays this text in the status bar when the control has focus.
  • Validation Rule: An expression that sets conditions that a value must meet for Access to accept the value.
  • Validation Text: A text message that Access displays if an entry fails to meet the Validation Rule expression. Use this to provide clues for entering appropriate data.

You’re not stuck with these property settings. At the form or report level, you can override any of these properties for just that form or report. In all cases, you save time and your data exhibits continuity from object to object.

# 2: Name fields appropriately

A field name should reflect a field’s purpose and describe the data it stores. The field names FirstName, LastName, and ZipCode are self-documenting and easy to manage. There’s no guessing. You know exactly what type of data should be in that field. There are, however, a few rules you must follow when choosing field names:

  • A field name can consist of up to 64 characters–but only letters, numbers, and spaces.
  • Don’t use reserved words to name fields, or any object, for that matter. For a list of reserved words, search Help for “reserved words.”

If you aren’t bound by an in-house naming convention, consider creating one of your own.

# 3: Don’t use spaces in field names

Although you might be tempted to use spaces in your field names, don’t. Spaces can be difficult to work with, especially in SQL statements and VBA code. If you use them, you must remember to enclose the reference in brackets, which is a nuisance. In addition, if you upgrade the database to SQL Server or export the data to use in another application, those space characters most assuredly will cause problems.

If you want field how long does viagra stay in your system headings and subsequent objects (see # 1) to display more natural text, use the field’s Caption property. For instance, if you name a field LastName, use the Caption property to display Last Name. Just remember that the Caption property is for display only. When referencing the field, you must always use the field’s actual name.

Caption properties come with their own set of behavioral problems. If you’re going to use the Caption property, plan for the following pitfalls:

  • Access ignores the AS keyword (alias) in a SQL statement if the underlying field has a Caption setting.
  • A Caption property setting won’t make it to the results of a Make Table query.
  • DAO and ADO field objects return a field’s Caption property and not the underlying field’s name.

# 4: Don’t waste data type effort

When storing numeric data, you might be tempted to assign a Number data type. Before you do, consider the data’s purpose. For instance, you won’t use street number or zip code values in mathematical equations. When this is the case, store the data as Text. You’ll save a bit on memory, but more importantly, the data type is true to the data’s purpose. If you should need to use a text value as a true numeric value, use the Val() function in the form

=Val(field)

where field represents the Text field that’s storing numeric values or a literal value.

# 5: Use the most appropriate field size

With today’s powerful systems, assigning the most appropriate field size isn’t as urgent as it once was. However, as a matter of good practice, developers still limit field size. It’s your first step to validating data. For instance, let’s say you store state abbreviations in a Text field with Field Size setting of 2. If the user enters ARK instead of AK, Access will reject the entry. Of course, the field size property rejects only entries that are too big. It can’t spot typos or other mistakes. The field would still accept other invalid entries, such as “A” or “K6.”

This works with numeric fields too; it just isn’t as obvious. For instance, a Byte field accepts values 0 through 255, while the Long Integer accepts values from -2,147,483,648 to 2,147,483,647.

Choose the appropriate data type and field size property for each field. Always choose the smallest data type and field size that will accommodate the largest possible value in that field.

# 6: Choose indexes carefully

Access uses an index to sort data in logical order, according to data type. The right indexing can improve performance. The wrong index will slow things down. By far, the most common mistake is to set too many indexes. Because Access updates the index each time you add or change a record, too many indexes will affect performance. Fortunately, you can apply a few indexing guidelines that will help:

  • Remember that a primary key automatically sorts–that’s an internal action you can’t control. In most tables, it’s the only index you really need. It’s called a unique index because every value in the field must be unique.
  • As a general rule, consider indexing a table’s foreign key.
  • Avoid an additional index on a table that you’ll be frequently updating, unless one of the above conditions applies.
  • If the table has a primary key, consider an index on a second field only when you’re working with large amounts of data, you plan to search or sort by that field often, or the field contains mostly unique values.

In short, index any field you want to sort, search, or join to another table to speed up tasks. Just remember that each index increases the size of the database, and too many indexes will slow things down. If you’re working with small to reasonable amounts of data, indexes–beyond the primary key–usually aren’t necessary.

One final word on indexes: Don’t use an index to sort. That isn’t their purpose and you might not end up with the results you need.

# 7: Beware of AutoNumber limitations

Use an AutoNumber field to generate a unique number for your records. Many people use these fields as the table’s primary key, which is fine. This type of key is called a surrogate key. In later versions of Access, you can generate an incremental or random value. Incremental values are fine for most tables. You probably won’t use random values unless you’re using replication to synchronize multiple databases.

Remember that a table can have only one AutoNumber field. That might limit the way you can use that table later. For instance, if you need to merge two tables with AutoNumber fields in a Make Table query, you might run into trouble. It’s important to keep this limitation in mind when adding an AutoNumber to a table.

# 8: Change the starting value of an AutoNumber field

By default, an AutoNumber field starts with the value 1 and increments by 1 for each record. Occasionally, you may need to start a new table with an AutoNumber value other than 1. There’s no built-in property that lets you do this, but you can force a value:

  1. Create the table and add an AutoNumber field but don’t enter any records.
  2. Create a second table with one Long Integer Number field. Give the field the same name as the AutoNumber field in the data table (step 1).
  3. In the single field table (step 2), enter the value that is 1 less than the value you want the AutoNumber field to begin with. For instance, if the first AutoNumber value must be 100, enter 99.
  4. Run an append query to append the record in the single-field table to the data table.
  5. Delete the single-field table.

When you enter the first record into your data table, the AutoNumber field will generate a value that is 1 more than the value you entered into the single-field table (step 3).

# 9: Use analysis tools

Access has two tools that will help you refine your design. First, the Table Analyzer Wizard reviews a table and recommends changes where appropriate. Second, the Performance Analyzer reviews your entire database and makes suggestions for improving the design. Usually, you’ll want to apply the wizards’ advice.

To run either wizard, choose Analyzer from the Tools menu and choose the appropriate item.

# 10: Don’t forget table properties

Like fields, tables have properties that define the table’s purpose. Most are self-explanatory, and the defaults are usually adequate. To access these properties, open the table in Design view and then choose Properties from the View menu. Here are a couple you should know about:

  • Order By: Specifies a sorting order that Access applies when you open the table. Simply enter the name of the field by which you want to sort the records. If you don’t use this setting, Access sorts by the primary key. If there’s no primary key, Access displays records in data entry order. It won’t matter much at the table level, since users don’t view tables. However, like many field properties, bound objects inherit the property.
  • Subdatasheet Name: Determines whether subdatasheets display related records. Many people find subdatasheets annoying. If that’s you, set this property to [None] to disable it.

# 11: Be aware of the limits

Although you may never reach any of the limits set for tables, you should know they exist:

  • Table names can contain up to 64 characters.
  • Field names can contain up to 64 characters.
  • Each table can contain up to 255 fields.
  • Table size is limited to 2 gigabytes minus the space needed for the system objects.
  • A Text field stores up to 255 characters.
  • A Memo field stores up to 65,535 characters when you enter data via the user interface. It’ll accept up to 1 gigabyte if you enter the data programmatically.
  • An OLE field supports up to 1 gigabyte.
  • Each table can have up to 32 indexes.
  • Each index can comprise up to 10 fields.
  • A Validation Rule expression stores up to 2,045 characters; the Validation Text property can have up to 255 characters.
  • The Description property stores up to 255 characters.
  • Each record can store up to 4,000 (for 2003) characters. (Version 2002 is 2,000.)

 


Susan Sales Harkins is an independent consultant and the author of several articles and books on database technologies. Her most recent book is Mastering Microsoft SQL Server 2005 Express, with Mike Gunderloy, published by Sybex. Other collaborations with Gunderloy are Automating Microsoft Access 2003 with VBA, Upgrader’s Guide to Microsoft Office System 2003, ICDL Exam Cram 2, and Absolute Beginner’s Guide to Microsoft Access 2003, all published by Que. Currently, Susan volunteers as the Publications Director for Database Advisors at http://www.databaseadvisors.com. You can reach her at ssharkins@setel.com.

Permalink • Print • Comment
« Previous PageNext Page »
Made with WordPress and Semiologic • Sky Gold skin by Denis de Bernardy