| Introduction |
|
1 | (662) |
|
How This Book Is Organized |
|
|
4 | (3) |
|
Conventions Used in This Book |
|
|
7 | (4) |
| I Learning the Access Essentials |
|
|
Starting with a Properly Normalized Design |
|
|
11 | (14) |
|
The Importance of a Good Design |
|
|
12 | (9) |
|
Engaging the Rules of Normalization |
|
|
13 | (1) |
|
Planning the Database Structure |
|
|
13 | (1) |
|
Dividing the Data into Tables |
|
|
13 | (1) |
|
Subdividing the Tables into Fields |
|
|
14 | (4) |
|
Is There a Relationship Between the Tables? |
|
|
18 | (1) |
|
|
|
19 | (2) |
|
|
|
21 | (4) |
|
Putting the Design to Work |
|
|
23 | (1) |
|
When You Need to Break the Rules |
|
|
23 | (2) |
|
Understanding Access Objects |
|
|
25 | (10) |
|
|
|
26 | (1) |
|
|
|
27 | (1) |
|
|
|
27 | (1) |
|
|
|
28 | (1) |
|
|
|
29 | (1) |
|
|
|
29 | (1) |
|
Reviewing the Screen Object |
|
|
30 | (1) |
|
The Screen Object's Properties |
|
|
30 | (1) |
|
Reviewing the DoCmd Object |
|
|
31 | (1) |
|
|
|
31 | (4) |
|
Syntax for Naming Objects |
|
|
32 | (1) |
|
History and Logic of Naming Conventions |
|
|
32 | (3) |
|
New User Features in Access 2000 |
|
|
35 | (12) |
|
Converting to Prior Versions |
|
|
36 | (1) |
|
Announcing the New Database Window |
|
|
36 | (3) |
|
Using the File Dialog Box |
|
|
39 | (1) |
|
Enhancing the Windows Clipboard |
|
|
40 | (1) |
|
Updating with Name AutoCorrect |
|
|
41 | (1) |
|
Improved Conditional Formatting |
|
|
41 | (1) |
|
|
|
42 | (1) |
|
Working with Subdatasheets |
|
|
42 | (1) |
|
Printing the Relationships Window |
|
|
43 | (1) |
|
Compacting Access Data on Closing |
|
|
44 | (3) |
| II Creating a Database and Its Objects |
|
|
|
|
47 | (14) |
|
|
|
48 | (1) |
|
|
|
48 | (3) |
|
|
|
49 | (2) |
|
Reviewing the Database Wizard |
|
|
51 | (6) |
|
|
|
57 | (4) |
|
|
|
61 | (18) |
|
|
|
62 | (1) |
|
Working with the Table in Design View |
|
|
63 | (6) |
|
Working with Field Properties |
|
|
64 | (1) |
|
|
|
65 | (3) |
|
Setting Data Types Relevant to the Data Being Stored |
|
|
68 | (1) |
|
Assigning Table Names That Describe Their Function |
|
|
69 | (1) |
|
Making Tables Efficient Objects Within the Database |
|
|
69 | (2) |
|
|
|
71 | (2) |
|
Multiple-Field Primary Keys |
|
|
72 | (1) |
|
|
|
73 | (3) |
|
|
|
76 | (3) |
|
|
|
79 | (26) |
|
|
|
80 | (1) |
|
Working with the Query Design Grid |
|
|
81 | (8) |
|
Adding a Table to the Query Design Grid |
|
|
82 | (2) |
|
Adding Fields to the Query Design Grid |
|
|
84 | (1) |
|
|
|
85 | (4) |
|
|
|
89 | (1) |
|
Using the Simple Query Wizard |
|
|
89 | (6) |
|
|
|
91 | (4) |
|
Using the Crosstab Query Wizard |
|
|
95 | (4) |
|
Using the Find Duplicates Query Wizard |
|
|
99 | (2) |
|
Using the Find Unmatched Query Wizard |
|
|
101 | (4) |
|
|
|
105 | (16) |
|
|
|
106 | (1) |
|
|
|
106 | (8) |
|
The Components of a Form in Design View |
|
|
108 | (1) |
|
|
|
109 | (2) |
|
Assigning Form Properties |
|
|
111 | (1) |
|
Modifying Form Properties to Create a Dialog Box |
|
|
112 | (2) |
|
|
|
114 | (1) |
|
|
|
114 | (1) |
|
Quickly Creating Forms with a Wizard |
|
|
115 | (6) |
|
|
|
116 | (2) |
|
Reviewing the Form Wizard |
|
|
118 | (1) |
|
Reviewing the Chart Wizard |
|
|
119 | (1) |
|
Working with the PivotTable Wizard |
|
|
119 | (2) |
|
|
|
121 | (16) |
|
|
|
122 | (1) |
|
|
|
122 | (8) |
|
|
|
123 | (1) |
|
|
|
124 | (5) |
|
|
|
129 | (1) |
|
Viewing Reports in Design View |
|
|
130 | (1) |
|
Setting Report Properties |
|
|
131 | (1) |
|
|
|
132 | (1) |
|
Creating a Report Template |
|
|
133 | (1) |
|
Inserting a Chart into a Report with the Chart Wizard |
|
|
134 | (1) |
|
|
|
134 | (3) |
|
Creating Controls and Setting Properties |
|
|
137 | (28) |
|
Reviewing Control Wizards |
|
|
138 | (1) |
|
Reviewing Control Properties |
|
|
138 | (1) |
|
Setting Control Properties |
|
|
138 | (1) |
|
|
|
139 | (1) |
|
Using the List Box Wizard |
|
|
140 | (11) |
|
Creating the List Box from Scratch |
|
|
143 | (1) |
|
Creating a Multiple-Column List Box |
|
|
144 | (5) |
|
The Column Count Property |
|
|
149 | (1) |
|
The Column Heads Property |
|
|
150 | (1) |
|
The Bound Column Property |
|
|
150 | (1) |
|
Working with Combo Box Controls |
|
|
151 | (4) |
|
Using the Combo Box Wizard |
|
|
151 | (1) |
|
Automatically Opening the Drop-Down List |
|
|
152 | (1) |
|
The Limit to List Property |
|
|
153 | (2) |
|
|
|
155 | (1) |
|
Using Command Button Controls |
|
|
155 | (3) |
|
Working with the Option Group Control |
|
|
158 | (7) |
|
Using the Option Group Wizard |
|
|
158 | (7) |
| III Storing, Controlling, and Manipulating Data |
|
|
Looking Up Values and Lists |
|
|
165 | (16) |
|
|
|
166 | (8) |
|
|
|
166 | (1) |
|
Exploring the Lookup Wizard |
|
|
167 | (7) |
|
Using the DLookUpO Function |
|
|
174 | (7) |
|
What's a Domain or SQL Aggregate? |
|
|
175 | (3) |
|
|
|
178 | (3) |
|
Defining and Working with Relationships |
|
|
181 | (14) |
|
Bringing Your Information Together |
|
|
182 | (3) |
|
Benefits of Using Relationships |
|
|
182 | (1) |
|
How Relationships Between Objects Work |
|
|
183 | (1) |
|
Primary Keys and Relationships |
|
|
184 | (1) |
|
Using the Relationships Window |
|
|
185 | (10) |
|
|
|
187 | (2) |
|
|
|
189 | (2) |
|
|
|
191 | (3) |
|
Printing the Relationships Window |
|
|
194 | (1) |
|
|
|
195 | (16) |
|
|
|
196 | (2) |
|
Using the Import Spreadsheet Wizard |
|
|
198 | (5) |
|
|
|
203 | (1) |
|
Using the Import Text Wizard |
|
|
203 | (8) |
|
|
|
206 | (1) |
|
Importing a Fixed-Width Text File |
|
|
207 | (4) |
|
Designing and Using Queries |
|
|
211 | (20) |
|
Creating a Sample Database for This Chapter |
|
|
212 | (1) |
|
Creating a Select Query Without Using a Wizard |
|
|
213 | (2) |
|
Grouping Data and Performing Calculations with Crosstab Queries |
|
|
215 | (2) |
|
Working with Action Queries |
|
|
217 | (14) |
|
Using Make-Table Queries to Create New Tables with Selected Data |
|
|
217 | (2) |
|
Updating Fields Within Tables with Update Queries |
|
|
219 | (3) |
|
Adding Records to Existing Tables with Append Queries |
|
|
222 | (2) |
|
Deleting Selected Records from Tables with Delete Queries |
|
|
224 | (7) |
|
Building Parameter Queries |
|
|
231 | (12) |
|
Setting Parameters in the Query Design Grid's Criteria Section |
|
|
232 | (4) |
|
Building a Simple Parameter Query |
|
|
232 | (2) |
|
Building a More Complex Parameter Query |
|
|
234 | (1) |
|
Setting a Parameter's Data Type |
|
|
235 | (1) |
|
Creating an Input Box for User-Requested Criteria |
|
|
236 | (5) |
|
Using Wildcards in Parameters |
|
|
241 | (2) |
|
Advanced Uses for Queries |
|
|
243 | (12) |
|
|
|
244 | (3) |
|
Creating a SQL Statement for a Macro RunSQL Action |
|
|
247 | (4) |
|
Creating a SQL Statement for Use in VBA |
|
|
251 | (4) |
| IV Creating the Interface: Input and Output |
|
|
Adding Controls to Forms and Reports |
|
|
255 | (26) |
|
|
|
256 | (1) |
|
|
|
257 | (3) |
|
|
|
258 | (1) |
|
Aligning Controls to the Grid |
|
|
259 | (1) |
|
|
|
259 | (1) |
|
|
|
260 | (5) |
|
Adding or Changing a Control Label |
|
|
262 | (1) |
|
Adding Several Controls of the Same Type |
|
|
263 | (2) |
|
|
|
265 | (2) |
|
|
|
267 | (1) |
|
Selecting Multiple Controls |
|
|
268 | (10) |
|
Selecting with the Shift Key |
|
|
269 | (1) |
|
Using Rulers to Select Multiple Controls |
|
|
270 | (3) |
|
Selecting Multiple Controls with the Mouse |
|
|
273 | (1) |
|
Selecting Most of Your Controls |
|
|
274 | (1) |
|
Changing Selection Behavior Defaults |
|
|
275 | (1) |
|
Changing the Properties of Multiple Controls |
|
|
276 | (2) |
|
Working with Bound Controls |
|
|
278 | (3) |
|
Using Forms to Enter and Review Data |
|
|
281 | (22) |
|
|
|
282 | (6) |
|
|
|
282 | (2) |
|
Continuous Form and Datasheet View |
|
|
284 | (2) |
|
|
|
286 | (2) |
|
|
|
288 | (1) |
|
Controlling Navigation in Forms |
|
|
289 | (5) |
|
|
|
289 | (3) |
|
Limiting Access to the Previous and Next Record |
|
|
292 | (2) |
|
|
|
294 | (3) |
|
Working with the Order By Property |
|
|
296 | (1) |
|
|
|
297 | (6) |
|
|
|
297 | (2) |
|
The Filter By Selection Feature |
|
|
299 | (1) |
|
The Filter By Form Feature |
|
|
300 | (3) |
|
Refining Forms: Efficient Data Entry and Beyond |
|
|
303 | (32) |
|
|
|
304 | (4) |
|
Using the Validation Rule Property |
|
|
304 | (3) |
|
|
|
307 | (1) |
|
|
|
308 | (2) |
|
Formatting Data with the Format Property |
|
|
310 | (5) |
|
Using the Format+ Function |
|
|
313 | (1) |
|
Using Format+ to Round Values |
|
|
314 | (1) |
|
|
|
315 | (12) |
|
Using the Input Mask Wizard |
|
|
319 | (4) |
|
Working with Other Input Mask Components |
|
|
323 | (1) |
|
Formatting for the 21st Century |
|
|
323 | (2) |
|
Working with Multiple Input Masks |
|
|
325 | (2) |
|
|
|
327 | (1) |
|
Using Expressions in Controls to Display Additional Data |
|
|
328 | (4) |
|
Inserting Custom Controls |
|
|
332 | (3) |
|
Setting ActiveX Properties |
|
|
334 | (1) |
|
Registering an ActiveX Control |
|
|
334 | (1) |
|
|
|
335 | (14) |
|
|
|
336 | (1) |
|
|
|
337 | (6) |
|
Working with Both Sets of Subform Properties |
|
|
341 | (2) |
|
Referring to Subforms and Their Controls |
|
|
343 | (1) |
|
A Subform Alternative: The Tab Control |
|
|
344 | (5) |
|
|
|
349 | (24) |
|
Working with the Form Module |
|
|
350 | (5) |
|
Creating Event Procedures |
|
|
352 | (3) |
|
Responding to Form Events |
|
|
355 | (2) |
|
Understanding the Order of Events |
|
|
356 | (1) |
|
Using Form Events to Open Other Forms |
|
|
356 | (1) |
|
Linking Forms with VBA Code |
|
|
357 | (3) |
|
Linking Forms with a Macro |
|
|
360 | (1) |
|
Printing Form Data Without the Form |
|
|
361 | (3) |
|
|
|
363 | (1) |
|
Reducing Data-Entry Tasks |
|
|
364 | (4) |
|
Working with Pop-Up Forms |
|
|
368 | (5) |
|
Linking Forms by Fields with the OpenForm's where Argument |
|
|
370 | (3) |
|
Making Your Point with Reports |
|
|
373 | (18) |
|
Grouping and Sorting Data |
|
|
374 | (4) |
|
Calculating Totals with Controls |
|
|
378 | (1) |
|
The Art of Page Numbering |
|
|
379 | (4) |
|
Starting with a Page Number Other Than the First Page |
|
|
380 | (3) |
|
|
|
383 | (8) |
|
|
|
384 | (1) |
|
|
|
385 | (1) |
|
Inserting Graphics in Your Report |
|
|
385 | (2) |
|
|
|
387 | (1) |
|
Working with OLE Graphics |
|
|
388 | (1) |
|
|
|
388 | (2) |
|
Drawing a Border Around the Report Page |
|
|
390 | (1) |
|
Displaying Detailed Data with a Subreport |
|
|
391 | (10) |
|
What's Subreport and Why Do You Need One? |
|
|
392 | (1) |
|
Adding a Subreport to an Unbound Main Report |
|
|
393 | (8) |
|
Linking a Subreport's Data to the Main Report |
|
|
397 | (1) |
|
Assigning Subreport Properties |
|
|
398 | (3) |
|
Creating Labels and Mail-Merge Documents |
|
|
401 | (20) |
|
|
|
402 | (7) |
|
|
|
406 | (3) |
|
|
|
409 | (3) |
|
Merging Access Data with Word Documents |
|
|
412 | (9) |
| V Automating the Database |
|
|
|
|
421 | (12) |
|
|
|
422 | (1) |
|
|
|
422 | (4) |
|
Generating Macros with Multiple Actions |
|
|
426 | (7) |
|
|
|
428 | (1) |
|
|
|
429 | (2) |
|
Macro Actions and Their Arguments |
|
|
431 | (2) |
|
|
|
433 | (10) |
|
Methods Used to Run Macros |
|
|
434 | (2) |
|
|
|
434 | (1) |
|
Using the RunMacro Action |
|
|
435 | (1) |
|
Attached Macros to Events |
|
|
436 | (1) |
|
|
|
436 | (3) |
|
Working with the AutoExec and AutoKeys Macros |
|
|
439 | (4) |
|
|
|
439 | (1) |
|
|
|
439 | (2) |
|
Using the Startup Options as a Shortcut |
|
|
441 | (2) |
|
Introducing Visual Basic for Applications |
|
|
443 | (18) |
|
|
|
444 | (3) |
|
|
|
444 | (1) |
|
|
|
444 | (1) |
|
|
|
445 | (1) |
|
|
|
445 | (1) |
|
|
|
445 | (2) |
|
|
|
447 | (1) |
|
The VBA Programming Environment |
|
|
448 | (1) |
|
Using the Visual Basic Editor |
|
|
449 | (12) |
|
|
|
450 | (1) |
|
|
|
451 | (3) |
|
|
|
454 | (3) |
|
|
|
457 | (2) |
|
|
|
459 | (2) |
|
Programming Access with VBA |
|
|
461 | (30) |
|
Familiarizing Yourself with the Access Applications Models |
|
|
462 | (3) |
|
Understanding Collections |
|
|
462 | (1) |
|
Where Do All These Objects Come From? |
|
|
463 | (2) |
|
|
|
465 | (4) |
|
|
|
468 | (1) |
|
|
|
469 | (2) |
|
|
|
471 | (1) |
|
Working with Variables and Data Types |
|
|
471 | (7) |
|
|
|
472 | (1) |
|
|
|
472 | (1) |
|
|
|
473 | (2) |
|
|
|
475 | (2) |
|
|
|
477 | (1) |
|
Giving Your Function a Data Type |
|
|
478 | (1) |
|
|
|
478 | (8) |
|
Local: Keeping It Specific to the Procedure |
|
|
479 | (2) |
|
Module-Level Variables: Sharing Variables Within the Module |
|
|
481 | (1) |
|
|
|
482 | (2) |
|
|
|
484 | (2) |
|
|
|
486 | (5) |
|
Calling a Procedure from Another Procedure |
|
|
488 | (1) |
|
|
|
489 | (2) |
|
Using VBA for Interactive Input |
|
|
491 | (34) |
|
Passing Arguments to Your Code |
|
|
492 | (1) |
|
Letting the Code Make Decisions |
|
|
493 | (7) |
|
The If...Then...Else Statement |
|
|
493 | (4) |
|
|
|
497 | (2) |
|
|
|
499 | (1) |
|
Displaying Information with a Message Box |
|
|
500 | (7) |
|
|
|
501 | (1) |
|
|
|
502 | (1) |
|
Using MsgBox+ Return Values |
|
|
503 | (4) |
|
Soliciting Information with Input Boxes |
|
|
507 | (4) |
|
|
|
511 | (5) |
|
|
|
511 | (3) |
|
The For Each...Next Statement |
|
|
514 | (2) |
|
When Your Code Doesn't Work |
|
|
516 | (9) |
|
Running Code in the Immediate Window |
|
|
517 | (4) |
|
Preventing Runtime Errors |
|
|
521 | (4) |
|
|
|
525 | (16) |
|
|
|
526 | (2) |
|
The ADO Connection Object |
|
|
526 | (1) |
|
|
|
527 | (1) |
|
|
|
528 | (2) |
|
|
|
530 | (11) |
| VI Beyond the Desktop |
|
|
Using Builders, Utilities, and Add-ins to Increase Efficiency |
|
|
541 | (22) |
|
Using the Expression Builder for Complex Expressions |
|
|
542 | (7) |
|
Anatomy of the Expression Builder |
|
|
542 | (2) |
|
Using the Expression Builder to Build Criteria |
|
|
544 | (5) |
|
Using Access Database Utilities |
|
|
549 | (11) |
|
The Compact and Repair Database Utility |
|
|
549 | (1) |
|
|
|
550 | (2) |
|
|
|
552 | (1) |
|
|
|
553 | (4) |
|
|
|
557 | (3) |
|
Installing and Using Add-ins |
|
|
560 | (3) |
|
Managing Add-ins with the Add-in Manager |
|
|
560 | (3) |
|
|
|
563 | (20) |
|
How Access and the Web Unite |
|
|
564 | (1) |
|
|
|
565 | (10) |
|
Working with Document Addresses in Hyperlinks |
|
|
565 | (1) |
|
Creating Hyperlink Fields |
|
|
566 | (1) |
|
|
|
567 | (3) |
|
Adding Hyperlinks to Forms and Reports |
|
|
570 | (5) |
|
|
|
575 | (8) |
|
Creating an HTML Template File |
|
|
575 | (1) |
|
Exporting Static Web Pages |
|
|
576 | (2) |
|
Working with Data Access Pages |
|
|
578 | (5) |
|
Applying Security to the Database |
|
|
583 | (16) |
|
|
|
584 | (1) |
|
Securing Native Access Databases (*.mdb) |
|
|
584 | (12) |
|
Implementing User-Level Security |
|
|
584 | (9) |
|
Setting a Database Password |
|
|
593 | (1) |
|
Encrypting and Decrypting the Database |
|
|
594 | (2) |
|
|
|
596 | (1) |
|
Securing an Access Project |
|
|
596 | (3) |
|
|
|
599 | (16) |
|
|
|
600 | (9) |
|
|
|
600 | (2) |
|
|
|
602 | (1) |
|
|
|
603 | (6) |
|
The Client/Server Database Environment |
|
|
609 | (4) |
|
|
|
611 | (1) |
|
|
|
612 | (1) |
|
|
|
612 | (1) |
|
Use of ActiveX Data Objects |
|
|
613 | (1) |
|
|
|
613 | (2) |
|
|
|
615 | (16) |
|
Understanding Access Projects |
|
|
616 | (4) |
|
Why Use an Access Project? |
|
|
617 | (1) |
|
|
|
617 | (3) |
|
Comparing an Access Project and a Database |
|
|
620 | (1) |
|
Working with a Project's Objects |
|
|
621 | (9) |
|
|
|
621 | (1) |
|
|
|
622 | (5) |
|
|
|
627 | (3) |
|
Securing an Access Project |
|
|
630 | (1) |
|
|
|
631 | (32) |
|
|
|
632 | (3) |
|
When to Use Class Modules |
|
|
634 | (1) |
|
Creating Your Own Objects |
|
|
635 | (18) |
|
Creating and Using Properties |
|
|
636 | (3) |
|
Guidelines for Property Procedures |
|
|
639 | (1) |
|
Creating and Using Methods |
|
|
640 | (13) |
|
Understanding ActiveX Technology |
|
|
653 | (10) |
|
|
|
654 | (4) |
|
|
|
658 | (5) |
| Glossary |
|
663 | (14) |
| Index |
|
677 | |