April 2, 2008

How do I… Remove misspelled words from the custom dictionary in Office 2003 or 2007?

Date: June 27th, 2007

Author: Jody Gilbert

This information is also available as a PDF download.

By default, Office 2003 offers a built-in custom dictionary that lets you store terms and names that would otherwise get flagged as unrecognized during a spell check. Word and PowerPoint offer background spell-checking, so all you have to do is right-click on a flagged term (wavy red line) and choose Add To Dictionary from the shortcut menu. Excel and Outlook require you to run the spell checker yourself. When they encounter an unrecognized term, they’ll open the Spelling dialog box and give you the option to add the term to the custom dictionary. Either way, the term will land in Custom.dic, the default custom dictionary file, and all the applications will ignore the term when they come across it again.

Sometimes, though, you may accidentally add a misspelled term to the custom dictionary. For instance, you might unwittingly mistype a company name or some new bit of jargon and add it to the dictionary before you catch your mistake. A dictionary with misspellings in it is somewhat counterproductive, so it’s a good idea to go in and remove them when they creep in. Although Excel and PowerPoint 2003 let you add words to the shared dictionary, you have to use Word (or Outlook) to modify the dictionary file. Here are the steps for doing this in Word:

  1. Go to Tools | Options, click on the Spelling & Grammar tab, and click the Custom Dictionaries button. (Figure A).

Figure A

  1. In the Custom Dictionaries dialog box (Figure B), make sure CUSTOM.DIC (default) is selected in the Dictionary List and click Modify.

Figure B

  1. When the CUSTOM.DIC dialog box opens (Figure C), locate the misspelled word in the Dictionary list box, select it, and click Delete.

Figure C

  1. To replace the term with the correct version, just type it in the Word text box and click Add (Figure D). When you’re finished, exit all dialog boxes by clicking OK.

Figure D

Outlook 2003

If you want to modify the custom dictionary using Outlook, just choose Options from the main Tools menu and click the Spelling tab, as shown in Figure E. Under Edit Custom Dictionary, click Edit. Outlook will then open the custom dictionary as a text file (Figure F).

Figure E

Figure F

What about Office 2007?

The Office 2007 apps all support editing the custom dictionary. And Outlook 2007 (which now offers background spell-checking in messages) includes an option to access the custom dictionary file in a slightly more elegant way than via text file.

  1. In all the apps, you just click the Office button and choose the Options command at the bottom of the menu.
  2. Choose Proofing from the pane of categories on the left (Figure G).

Figure G

  1. Click name brand viagra online Custom Dictionaries to open the dialog box shown in Figure H.

Figure H

  1. Click Edit Word List to open the CUSTOM.DIC dialog box (Figure I).

Figure I

From there, it works the same as Office 2003 — except that there’s a Delete All option now. I guess that’s in case you go on a bender and manage to fill up the entire dictionary file with misspelled words.

Permalink • Print • Comment

10+ things you should do before building a custom Access database

Date: March 3rd, 2008

Author: Susan Harkins

Whether you take on freelance work or you support your organization’s IT needs by developing custom database solutions, you must build an efficient, easy-to-use database if you plan to stay employed. Like most things, there’s a right and a wrong way. You might not get credit for doing things right, but you’ll certainly hear about it if you do things wrong.

The road to the right database starts well before you start building tables. There are a number of things you can do before you build a database to make sure that the development process goes smoothly and that your custom database fits the organization’s purpose and goals. The following tips are aimed as Access users, but most of them apply to just about any custom database.

Note: This information is also available as a PDF download.

#1: Make nice

You’ll get nowhere without the support and guidance of two specific groups of people:

  • Those who update legal viagra the data. These people know what’s needed to get the job done.
  • Those who use the information. These people know the goals for the database and the business at large.

In a small company, one person might fill both positions, although they have different needs. However, that person’s experiences with the data are valid. It’s your job to find solutions that satisfy everyone, within reason.

#2: Bend but don’t break

Being just a developer won’t get the job done. Sometimes, you must be a diplomat. I recommend that you practice the art of persuasion: “Let me show you something…” will serve you better than “That can’t be done.” This may require you to think fast on your feet. Of course, “Let me work up an example” can always buy a little time.

#3: Actually review their specs

Sometimes, you get lucky and someone in-house supplies a list of specifications. If that happens, it’s information worth keeping, so don’t be too eager to trash the list. Working with those original specs will save you some time and might keep you from stepping on someone’s toes — never a good idea if you can help it.

#4: Compare the specs to the working environment

Most Access databases have just a few users, but Access can handle numerous users. You probably won’t build an interactive intranet database the same way you’d build the solution for a single user. Access seldom fails to meet the demands if you develop for multiple users from the beginning.

#5: How many keys are there to the front door?

Keeping hackers out of your intranet or Web-based database is much more complex than using Access’ workgroup security. In fact, if you need this article and you’ve taken on a Web-based database project, you might have bitten off more than you can chew — good luck! Access is certainly up to the challenge, but the truth is, most developers aren’t. That’s why IT professionals scoff at Access. The sad truth is, many developers don’t understand the Web. If you’re one of them, don’t take on a Web project hoping to learn on the job. You and your client will pay too high a price.

#6: Do the work

Sit down with the people who do the work and learn the process:

  • Review all paper forms in the current process.
  • How much data — both records and fields — will the database store?
  • How much searching and sorting will the users require?
  • Where does the data come from? Will the system need to accommodate foreign data?
  • Will the system export data to foreign formats?
  • Review the current reports and analysis. Talk with the people who use them, for insight.

In short, follow the data from beginning to end. There’s no substitute for knowing the data and the current motivations that push that data from collection to final form.

#7: Re-evaluate

Once you’re familiar with the specs and environment, you might have to shoot yourself in the foot. Access just might not be the best solution for your client. A more powerful system, such as SQL Server 2005 Express Edition, might be a better choice. Or Access might be just part of the solution. For instance, InfoPath’s XML-based forms or .NET forms might be more efficient than Access forms, especially if you’re publishing data to an intranet or to the Internet. Certainly, Excel’s analytical tools are superior to those Access provides. Don’t try to stuff the entire works into an Access-or-bust solution.

#8: Recommend the best route — not the easiest one

Don’t be afraid to suggest a major overhaul if you’re upgrading a legacy database. Neither the latest and greatest version of Access nor more expensive hardware will resolve performance issues that stem from bad design.

#9: Improve the process

Work with the end users to improve the manual process if there’s room for improvement, and there usually is. It’s a mistake to computerize the existing workflow until it’s the best it can be. Software alone won’t improve a bad routine — it’ll just change the problems.

#10: Define and redefine

Once you’ve gathered all your facts, compose a mission statement for the application. This might require one to several paragraphs. I’m not talking about a new set of specifications. Rather, give your client a realistic review of their needs versus reality. You’re simply restating the database’s purposes, but with the benefit of your insight into the workflow and organization’s needs.

#11: How’s that for quick response?

Once you believe you have a good feel for the client’s needs and the database’s purposes, create a series of mock-up forms to show the client. You’ll get a few oohs and ahhhs, but listen to the souls brave enough to say, “But wait…” Their insights may be valid and could save you some trouble down the road. On the other hand, this is where #2 can come in handy. Sometimes, people just can’t conceive of doing something any way but the way they know.

You can use graphics software to draw and print the forms or use Access — it’s a great rapid applications development (RAD) tool. And you can really impress your clients by actually using their data. Sometimes, a quick run at normalizing the data can help the mock-up process. It’s not strictly necessary, but it may show you some holes you might otherwise miss.


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@gmail.com.

Permalink • Print • Comment

10 ways to get more mileage out of PowerPoint

Date: January 7th, 2008

Author: Susan Harkins

Microsoft Office users know that PowerPoint is a powerful presentation package, but some of them find it easier to write the content than to create and deliver the final show. The truth is that PowerPoint is just as easy to use as all the other Office applications, but a lot of users just aren’t quite up to speed with it. Here are a few quick tips that will help your users get familiar with some of PowerPoint’s most useful features.

Note: This information is also available as a PDF download.

#1: Annotate your presentation

With PowerPoint 2003, you can use the mouse pointer to write on a slide during a presentation. It’s similar to writing on a transparency. This capability works best with a pen input device or a Tablet PC, but the mouse will work — it just isn’t as steady.

There are three free-style drawing tools:

  • The ballpoint pen draws a thin line.
  • The felt tip pen draws a medium line.
  • The highlighter draws a fat colored line.

To use this feature, right-click the background of a slide and select Pointer Options. You can also choose a color. Then, simply select one of the ink options. Use the ballpoint and felt tip tools to write messages and draw objects. The highlighter’s color appears behind the text and doesn’t block the view of highlighted text or objects.

Just be careful: Ink markings aren’t permanent. When you close the presentation, be sure to click Yes when prompted if you want to save markings you made during the presentation.

#2: Get your timing down

PowerPoint has a stopwatch feature that lets you time yourself as you rehearse a presentation. When you run a rehearsed timing session, PowerPoint records how long you spend on each slide. You can use this information in one of two ways:

  • Use the timed results to set a timed slide.
  • Use the timed results to help keep you on track during the presentation.

To enable this feature, choose Rehearse Timings from the Slide Show menu. PowerPoint will start the slide show and display the Rehearsal dialog box in the top-left portion of the screen, as shown in Figure A. The timer displays the elapsed time for each slide and the overall presentation.

Figure A: The timer tracks each slide and the overall presentation.

If you’re creating a self-running presentation, be sure to save at least one run — your best run if possible. That way, your presentation can default to the rehearsed setting, just in case. If even one slide in your self-running presentation makes it through to your finished presentation without a timed setting, your show will come to a screeching halt — and so will the impression you hoped to make. With a saved rehearsed timing setting, that won’t happen.

When you’re finished rehearsing, PowerPoint returns you to Slide Sorter and displays each slide’s time below the slide.

#3: Don’t ladies viagra tie up your audience

The person viewing your self-running presentation might not need as much time with each slide as you anticipate. Be sure to include at least one action button with each slide so viewers can opt out of a slow slide or skip past a slide that doesn’t apply to them.

To add a navigation action button to every slide in the presentation, add the button to the slide master by choosing Master from the View menu. Then, click Slide Master. In PowerPoint 2007, you’ll find Slide Master in the Presentation Views group on the View tab.

When the slide master appears, do the following to add an action button:

  1. Choose Action Buttons from the Slide Show menu. (In PowerPoint 2007, you’ll find Shapes in the Illustrations group on the Insert tab. Click the drop-down button. Action buttons are at the bottom of the list.)
  2. Click the appropriate action button (AutoShapes) from the resulting submenu.
  3. Click and drag inside the slide where you want to drop the button.
  4. When you release the mouse, PowerPoint will display a dialog with several settings. Most of the time, the default settings will be adequate — especially for a self-running presentation.

The action button submenu can also float. After displaying it, simply grab the handle — the dots at the top — and drag it to another spot. You can then add action buttons to your slides without going through the menu selections. (PowerPoint 2007 doesn’t have this feature.)

You don’t have to put an action button on the slide master. You can add a navigation button to just a single slide if you want to limit viewers’ control of the presentation.

#4: Take a quick peek

While editing a slide, you can click the Slide Show From Current Slide button (at the bottom of the Slides pane). PowerPoint will start the slide show from the selected slide, instead of at the beginning. If you just want a quick look at the current slide, press Esc to return to edit mode. Otherwise, click through the remaining slides in the show. Skipping several slides in the show can be a great time-saver.

A full-size slide may be a bit more slide than you really want or need at the time. To see a smaller version, hold down the Ctrl key while clicking Slide Show From Current Slide. Instead of consuming the entire screen, PowerPoint will display a quarter-size version of the slide. Again, you can press Esc to return to edit mode or click in the small screen display to advance through the remaining slides.

#5: Change the body text default

You can use the slide master to set the font type, size, and other properties for each slide’s title and body text, but you can’t use it to change the default font for other objects, such as text boxes. Luckily, there’s another way. First, display a slide in edit mode and make sure no objects are selected. Then, choose Font from the Format menu. In the resulting Font dialog box, choose all the desired options and click OK. From that point on, non-title, not-body text will reflect the new style you just created. (This technique doesn’t work in PowerPoint 2007.)

#6: Nudge over…

Moving objects is as easy as dropping and dragging, right? That’s true until you’re working on a laptop that doesn’t support a mouse. When that’s the case, use the arrow keys to move an object. Select the object and then use the appropriate arrow key. Each key press will move the object approximately 1/12 of an inch. PowerPoint applies this predefined amount when the grid is enabled. To change or disable grid settings, click Draw on the Drawing toolbar and choose Grid And Guides. In the resulting dialog box, you can select or deselect the Snap Objects To Grid check box, adjust the grid spacing, and display the grid and/or drawing guides on your slides.

#7: Make a quick copy

Using the Edit menu, you can make copies of most objects, but there’s a quicker way. In almost any view, hold down the Ctrl key and drag the object just a bit. Doing so will automatically generate a copy of the selected object. Hold down Ctrl + Shift to create a copy that’s aligned with the original object.

#8: Squeeze it all in

Sometimes, you just can’t get everything you want to fit on one slide. If that text is in a placeholder, you don’t need to cut and paste part of the text into a new slide. In Outline mode, PowerPoint can push text along with just a few clicks. First, display the Outlining toolbar by choosing Toolbars from the View menu and then choosing Outlining. Next, click the Outline tab to display the presentation text in the Outline pane. Position the cursor at the end of the last line you want to keep on the current slide. Then, press Enter and click Promote (the arrow at the top that’s pointing left) on the Outlining toolbar. Doing so will insert a new slide for all the text you just split from the previous one. Enter a new title for the new slide, as shown in Figure B. Continue to adjust the text as necessary.

Figure B: Use Outline mode to control overflowing text.

This method still works in PowerPoint 2007, but you don’t need the Outlining toolbar. Just press Enter at the appropriate spot to insert a new slide.

#9: Suppress bullets

By default, PowerPoint enters a new bullet every time you press Enter, as long as you’re using the bulleted list format. Fortunately, you’re not stuck. Hold down the Shift key and press Enter to insert a soft return. This will drop the insertion point to the next line without adding a new bullet, as shown in Figure C.

Figure C: You won’t always want a bullet point for every new line.

#10: Create invisible links

Hyperlinks make it easy to jump from one place to another, but by default, linked text looks different from the rest of your message. If you find the difference distracting, most likely your audience will too. Eliminate that distraction as follows:

  1. Enter the text you want to link.
  2. Select the Rectangle button on the Drawing toolbar and create an AutoShape that covers just the text-don’t make it too large. (In PowerPoint 2007, choose a shape from the Illustrations group on the Insert tab.)
  3. Select the AutoShape and click the Insert Hyperlink button on the Standard toolbar. (In PowerPoint 2007, you’ll find Hyperlink in the Links group on the Insert menu.) In both versions, you can right-click the shape and choose Hyperlink from the resulting submenu.
  4. Enter the hyperlink in the Address field in the resulting Insert Hyperlink dialog box and then click OK.
  5. Right-click the AutoShape and choose Format AutoShape. Set the fill color to No Fill and the line color to No Line and click OK.

The invisible AutoShape is really the link and not the text.


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@gmail.com.

Permalink • Print • Comment

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
Next Page »
Made with WordPress and an easy to use WordPress theme • Sky Gold skin by Denis de Bernardy