Details

Access 2007 VBA Programmer's Reference


Access 2007 VBA Programmer's Reference


1. Aufl.

von: Teresa Hennig, Rob Cooper, Geoffrey L. Griffith, Armen Stein

27,99 €

Verlag: Wiley
Format: PDF
Veröffentl.: 27.04.2007
ISBN/EAN: 9780470147993
Sprache: englisch
Anzahl Seiten: 1100

DRM-geschütztes eBook, Sie benötigen z.B. Adobe Digital Editions und eine Adobe ID zum Lesen.

Beschreibungen

<i>Access 2007 VBA Programmer's Reference</i> covers a wide spectrum of programming topics relevant to Access. Although it assumes the reader has some familiarity with VBA programming language, it begins with a brief introduction to VBA. And to help you leverage the tools that Access provides, a chapter highlights the new features in Microsoft Office Access 2007 — including new wizards and GUI (graphical user interface) elements that previously required VBA code, as well as new VBA features. <p>The book also discusses how to create and name variables, how to use Data Access Object (DAO) and ActiveX Data Object (ADO) to manipulate data both within Access and within other applications, proper error handling techniques, and advanced functions such as creating classes and using APIs. Key new objects such as using Macros and the Ribbon are explored, too, as are forms and reports, the two most powerful tools for working with and displaying data. Working with other applications is covered extensively both in a general nature and for working specifically with Microsoft Office applications, Windows SharePoint Services, and SQL Server. Of course, this book wouldn’t be complete without discussing security issues and the Developer Extensions.</p>
<p>Acknowledgments xi</p> <p>Foreword xiii</p> <p>Introduction xxxi</p> <p>Chapter 1: Introduction to Microsoft Access 2007 1</p> <p>A Brief History of Access 1</p> <p>Is Access the Only Database System? 2</p> <p>Developing Databases Without VBA Code 4</p> <p>Summary 18</p> <p>Chapter 2: Access, VBA, and Macros 19</p> <p>VBA in Access 19</p> <p>VBA versus Macros in Access 22</p> <p>Summary 31</p> <p>Chapter 3: New Features in Access 2007 33</p> <p>Who Benefits 34</p> <p>New Look 37</p> <p>Development Environment 39</p> <p>Forms 43</p> <p>Reports 47</p> <p>Embedded Macros 50</p> <p>Access Data Engine 52</p> <p>Integration with SharePoint 55</p> <p>External Data Sources 59</p> <p>Security 60</p> <p>Convert with Confidence 63</p> <p>ADE and Creating Runtime Files 63</p> <p>What’s Gone or Deprecated 65</p> <p>Summary 66</p> <p>Chapter 4: Using the VBA Editor 67</p> <p>Anatomy of the VBA Editor 67</p> <p>Using the Object Browser 69</p> <p>Testing and Debugging VBA Code 71</p> <p>Summary 82</p> <p>Chapter 5: VBA Basics 83</p> <p>VBA Objects 83</p> <p>Variables and VBA Syntax 85</p> <p>Other VBA Structures 104</p> <p>Summary 110</p> <p>Chapter 6: Using DAO to Access Data 111</p> <p>Data Access Objects 111</p> <p>Why Use DAO? 112</p> <p>New Features in DAO 113</p> <p>Referring to DAO Objects 115</p> <p>The DBEngine Object 117</p> <p>The Databases Collection 122</p> <p>DAO Object Properties 127</p> <p>Creating Schema Objects with DAO 132</p> <p>Database Encryption with DAO 143</p> <p>Managing Access (JET) Security with DAO 147</p> <p>Data Access with DAO 157</p> <p>Append Only Fields 187</p> <p>Summary 189</p> <p>Chapter 7: Using ADO to Access Data 191</p> <p>Ambiguous References 192</p> <p>Referring to ADO Objects 193</p> <p>Connecting to a Data Source 193</p> <p>Rolling Your Own Connection String 196</p> <p>Data Access with ADO 200</p> <p>Creating ADO Recordsets 204</p> <p>Creating Schema Recordsets 219</p> <p>Using ADO Events 221</p> <p>Testing the State Property 223</p> <p>Creating Schema Objects with ADOX 223</p> <p>Managing Security with ADO 231</p> <p>Summary 231</p> <p>Chapter 8: Executing VBA 233</p> <p>When Events Fire 233</p> <p>VBA Procedures 238</p> <p>Evaluating Expressions in VBA 247</p> <p>Using Recordsets 249</p> <p>Using Multiple Recordsets 252</p> <p>Using VBA in Forms and Reports 256</p> <p>Debugging VBA 260</p> <p>Investigating Variables 261</p> <p>Common VBA Techniques 267</p> <p>String Concatenation Techniques 273</p> <p>Summary 274</p> <p>Chapter 9: VBA Error Handling 275</p> <p>Why Use Error Handling? 275</p> <p>Two Kinds of Errors: Unexpected and Expected 276</p> <p>Basic Error Handling 278</p> <p>Cleaning Up After an Error 285</p> <p>More on Absorbing Expected Errors 286</p> <p>Issues in Error Handling 289</p> <p>Summary 290</p> <p>Chapter 10: Using VBA to Enhance Forms 291</p> <p>VBA Basics 291</p> <p>Creating Forms the 2007 Way 295</p> <p>Summary 346</p> <p>Chapter 11: Enhancing Reports with VBA 347</p> <p>Introduction to Reports 347</p> <p>Creating a Report 351</p> <p>Working with VBA in Reports 351</p> <p>Important Report Events and Properties 352</p> <p>Report Properties 358</p> <p>Working with Charts 360</p> <p>Common Report Requests 361</p> <p>Layout View 369</p> <p>Report View 370</p> <p>Summary 373</p> <p>Chapter 12: Customizing the Ribbon 375</p> <p>Ribbon Overview 375</p> <p>Custom Menu Bars and Toolbars 376</p> <p>Ribbon Customization 377</p> <p>Saving a Custom Ribbon 377</p> <p>Specifying the Custom Ribbon 378</p> <p>Creating an Integrated Ribbon 401</p> <p>Creating a Ribbon from Scratch 407</p> <p>Customizing the Office Menu 418</p> <p>Customizing the Quick Access Toolbar 420</p> <p>More Ribbon Tips 421</p> <p>Summary 422</p> <p>Chapter 13: Creating Classes in VBA 423</p> <p>A Touch of Class 424</p> <p>Why Use Classes? 426</p> <p>Creating a Class Module 427</p> <p>Naming Objects 440</p> <p>Using Class Events 443</p> <p>Forms as Objects 452</p> <p>Variable Scope and Lifetime 458</p> <p>The Me Property 461</p> <p>Creating a Clone Method 463</p> <p>Creating and Using Collection Classes 464</p> <p>The Three Pillars 476</p> <p>Summary 483</p> <p>Chapter 14: Extending VBA with APIs 485</p> <p>Introducing the Win32 API 485</p> <p>Introducing Linking 489</p> <p>Linking Libraries in Access 2007 490</p> <p>Understanding C Parameters 497</p> <p>Err.LastDLLError 505</p> <p>Distributing Applications That Reference Type Libraries and Custom DLLs 507</p> <p>Summary 507</p> <p>Chapter 15: SQL and VBA 509</p> <p>Working with SQL Strings in VBA 509</p> <p>Using SQL When Opening Forms and Reports 513</p> <p>Using SQL to Enhance Forms 514</p> <p>The ReplaceOrderByClause and ReplaceWhereClause Functions 530</p> <p>Chapter 16: Working with Office Applications 537</p> <p>Sharing Information Is a Two-Way Street 537</p> <p>Working with Outlook 538</p> <p>Sending Information from Access to Excel 543</p> <p>Exchanging Data with Microsoft Word 549</p> <p>Sending Data to PowerPoint 553</p> <p>Pulling Data from Access 556</p> <p>Summary 559</p> <p>Chapter 17: Working with SharePoint 561</p> <p>Overview 562</p> <p>Access Features on SharePoint 563</p> <p>SharePoint Features in Access 576</p> <p>Summary 594</p> <p>Chapter 18: Database Security 595</p> <p>Security for the ACCDB File Format 595</p> <p>Security for the MDB File Format 606</p> <p>Summary 647</p> <p>Chapter 19: Understanding Client-Server Development with VBA 649</p> <p>Client-Server Applications 650</p> <p>Choosing the Correct File Format 652</p> <p>Controlling the Logon Process 672</p> <p>Binding ADODB Recordsets 678</p> <p>Using Unbound Forms 684</p> <p>Summary 692</p> <p>Chapter 20: Working with the Win32 Registry 693</p> <p>About the Registry 694</p> <p>Using the Built-In VBA Registry Functions 703</p> <p>Using the Win32 Registry APIs 709</p> <p>Summary 720</p> <p>Chapter 21: Using the ADE Tools 721</p> <p>The Redistributable Access Runtime 722</p> <p>The Package Solution Wizard 724</p> <p>Save as Template 731</p> <p>Source Code Control Support 747</p> <p>Summary 753</p> <p>Chapter 22: Protecting Yourself with Access 2007 Security 755</p> <p>The Office Trust Center 756</p> <p>Disabled Mode 761</p> <p>Digital Signatures and Certificates 769</p> <p>Access Database Engine Expression Service 778</p> <p>Summary 780</p> <p>Appendix A: Upgrading to Access 2007 783</p> <p>Appendix B: References for Projects 805</p> <p>Appendix C: Calling Managed Code 815</p> <p>Appendix D: DAO Object Method and Property Descriptions 839</p> <p>Appendix E: ADO Object Model Reference 873</p> <p>Appendix F: ADO Object Argument Enumeration Information 889</p> <p>Appendix G: The Access Object Model 905</p> <p>Appendix H: Windows API Reference Information 973</p> <p>Appendix I: Windows Registry Information 981</p> <p>Appendix J: Access Wizards, Builders, and Managers 1009</p> <p>Appendix K: Reserved Words and Special Characters 1017</p> <p>Appendix L: Naming Conventions 1027</p> <p>Appendix M: Tips and Tricks 1045</p> <p>Index 1081</p>
<b>Teresa Hennig</b>  is president of both the Pacific Northwest Access Developer Group and the Seattle Access Group, and is host for INETA’s monthly webcasts. She was the coordinating author for Access 2003 VBA Programmer's reference, and continues to publish two monthly Access newsletters. In recognition of her expertise and dedication to the Access community, Teresa was awarded Microsoft Access MVP. <p><b>Rob Cooper</b> is a test lead on the Access team at Microsoft.  During the Access 2007 release, he led the security efforts across the test team and worked on several new features including disabled mode, database encryption, Office Trust Center, and sorting, grouping and totals. Rob also led efforts around the Access object model and continues to provide direction around programmability and security in Access.<br /> A long-time fan of Access, Rob is a frequent speaker at the Seattle Access Group and PNWADG meetings and has written for the Microsoft Knowledge Base and Access Advisor.</p> <p><b>Geoffrey Griffith</b> is an avid Access user who contributed to the Access 2007 product as a Software Design Engineer in Test for the Microsoft Office Access team. He enjoys participating in software community events by attending and speaking for local users groups and helping all those who would seek it.</p> <p><b>Armen Stein</b> is a Microsoft Access MVP and the president of J Street Technology, Inc., a team of database application developers in Redmond, Washington.  Armen is President Emeritus of the Pacific Northwest Access Developers Group, and has also spoken at Seattle Access and Portland Access Users Group meetings. He has taught database classes at Bellevue Community College, and also developed and taught one-day training classes on Access and Access/SQL Server development.</p>
<b><i>Access 2007 VBA Programmer's Reference</i></b> <p>Written by Access MVPs and Microsoft Access testers, this resource will give you the tools to leverage Access 2007's built-in functionality and VBA in order to build more dynamic applications. It explores all aspects of VBA programming for Access and describes the latest innovations. You'll also find several commonly used techniques and sample code to help you get started, as well as expert tips to make your code easier to maintain.</p> <p>The expert author team will show you how to create and name variables, manipulate data using Data Access Object (DAO) and ActiveX® Data Object (ADO), handle errors, and create classes. You'll also learn how to utilize the latest wizards as well as modify and enhance the code that the wizards create. And you'll learn how to take advantage of key new objects, enhanced macros, and the Office Ribbon.</p> <p><b>What you will learn from this book</b></p> <ul> <li>All about Access 2007's new features and the building blocks of VBA</li> <li> <p>Ways to debug your code and avoid common pitfalls</p> </li> <li> <p>Techniques for accessing data in Access and other external data sources</p> </li> <li> <p>Steps for creating and enhancing forms and reports</p> </li> <li> <p>Methods for controlling access to your applications and files</p> </li> <li> <p>How to use VBA with APIs and other Office applications</p> </li> <li> <p>Tips for using the Windows® Registry and ADE tools</p> </li> </ul> <p><b>Who this book is for<br /> </b>This book is a comprehensive resource for Access users and VBA developers who want to increase the power of Access using VBA.</p> <p><b>Wrox Programmer's References</b> are designed to give the experienced developer straight facts on a new technology, without hype or unnecessary explanations. They deliver hard information with plenty of practical examples to help you apply new tools to your development projects today.</p>

Diese Produkte könnten Sie auch interessieren:

The CISO Evolution
The CISO Evolution
von: Matthew K. Sharp, Kyriakos Lambros
PDF ebook
33,99 €
Data Mining and Machine Learning Applications
Data Mining and Machine Learning Applications
von: Rohit Raja, Kapil Kumar Nagwanshi, Sandeep Kumar, K. Ramya Laxmi
EPUB ebook
190,99 €