www.it-ebooks.info
www.it-ebooks.info
PROFESSIONAL
Access® 2013 Programming
www.it-ebooks.info
www.it-ebooks.info
PROFESSIONAL
Access 2013 Programming
®
Teresa Hennig
Ben Clothier
George Hepworth
Dagi (Doug) Yudovich
www.it-ebooks.info
Professional Access® 2013 Programming
Published by
John Wiley & Sons, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com
Copyright © 2013 by John Wiley & Sons, Inc., Indianapolis, Indiana
Published simultaneously in Canada
ISBN: 978-1-118-53083-2
ISBN: 978-1-118-53082-5 (ebk)
ISBN: 978-1-118-78961-2 (ebk)
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means,
electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108
of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization
through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers,
MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the
Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201)
748-6008, or online at />Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with
respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including
without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or
promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is
sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the
publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred
to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further,
readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this
work was written and when it is read.
For general information on our other products and services please contact our Customer Care Department within the
United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.
Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with
standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to
media such as a CD or DVD that is not included in the version you purchased, you may download this material at
. For more information about Wiley products, visit www.wiley.com.
Library of Congress Control Number: 2013907974
Trademarks: Wiley, Wrox, the Wrox logo, Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affi liates, in the United States and other countries, and may not be
used without written permission. Access is a registered trademark of Microsoft Corporation. All other trademarks are the
property of their respective owners. John Wiley & Sons, Inc., is not associated with any product or vendor mentioned in
this book.
www.it-ebooks.info
To my family and my dearest friends — you are my inspirations, role models and
mentors. Whatever I am facing, I can find strength and guidance by thinking of
what my Mom, Papa, Dad, or brother might say or do. Every day I have reasons
to say thank you for teaching us to work, to accept responsibility for our actions,
to do the right thing, and to help others. You taught us to do what we enjoy and
to do our best. What a great formula to be happy, energized, and resilient, and to
appreciate all that we have! You set the foundation for me to embrace the thrills,
lessons, and adventures in life. And, throughout life, to be compassionate and to
give generously — especially laughter and smiles, a hug or a helping hand.
—Teresa Hennig
To Suzanne and Harry, for being just plain awesome. I couldn’t have done it
without you two!
—Ben Clothier
I want to dedicate my part in this book to my mother and father, who not only
brought me into the world, but showed me how to live properly once I got here.
Family comes first, but that is easy when you have a family like mine. To my
siblings, JoAnna, Tom, Sam, Jack, Nancy, and Jane: Your encouragement (and
unusually high tolerance for bad jokes, lies, and war stories) helps keep me going.
Thanks. I promise I’ll update the family website again soon. I also need to make
special mention of my daughter, Lyndsey; you give me reason to be proud every
day. Love ya, sweetie. We’ll make up for the missed weekend dinners soon.
—George Hepworth
To my wife, Lisa, who still patiently picks up the slack as I dive head-first into
new adventures. None of it would have been possible without you. I love you.
—Dagi Yudovich
www.it-ebooks.info
CREDITS
EXECUTIVE EDITOR
PRODUCTION MANAGER
Robert Elliott
Tim Tate
PROJECT EDITOR
VICE PRESIDENT AND EXECUTIVE GROUP
PUBLISHER
Christina Haviland
Richard Swadley
TECHNICAL EDITORS
VICE PRESIDENT AND EXECUTIVE PUBLISHER
F. Scott Barker
Jerry Dennison
Jerry Wood
Neil Edde
ASSOCIATE PUBLISHER
PRODUCTION EDITOR
Jim Minatel
Christine Mugnolo
PROJECT COORDINATOR, COVER
COPY EDITOR
Katie Crocker
Nancy Rapoport
PROOFREADER
EDITORIAL MANAGER
Sarah Kaikini, Word One New York
Mary Beth Wakefield
INDEXER
FREELANCER EDITORIAL MANAGER
John Sleeva
Rosemarie Graham
COVER DESIGNER
ASSOCIATE DIRECTOR OF MARKETING
Wiley
David Mayhew
COVER IMAGE
MARKETING MANAGER
© iStockphoto.com/PhekThong Lee
Ashley Zurcher
BUSINESS MANAGER
Amy Knies
www.it-ebooks.info
ABOUT THE AUTHORS
TERESA HENNIG has been an Access developer and business consultant since 1997,
when she decided to start her own business on the second day that she used Access.
Her company’s name, Data Dynamics Northwest, aptly reflects her dynamic personality and her innate ability to quickly grasp a situation, formulate and implement
a solution, and motivate others. With a strong background in business and project
management, Teresa focuses on providing intuitive, cost-effective solutions that support all levels of an organization. One of her favorite aspects of being a consultant is working with
an endless variety of businesses across many industries and in numerous locations.
As a self-taught developer, Teresa quickly became involved with the Seattle Access Group and
has been the President since 1999. It wasn’t long before she was asked to help run, and then
became President of, the Pacific Northwest Access Developer Group. Her fi rst book Access 2003
Programmer’s Reference (Wiley, 2003) opened the door to new opportunities to help fellow developers share their passion and expertise with the community. Over the past 10 years, Teresa has helped
dozens of colleagues to become authors, editors and contributors. This is her sixth book, and she
already has requests to do more.
Teresa has been recognized as a Microsoft MVP continuously since 2006, and has twice earned
INETA’s National Community Champion award. Teresa thrives on challenges, project management,
and creating cost-effective solutions. Her skills for motivating and helping others are reflected in
her contributions to the developer community and support of numerous non-profit organizations.
She is expanding her reach by doing presentations and offering customized training, mentoring,
and consulting for database development as well as business and project management. You can
contact Teresa at to learn more about any of these services. You
can also read about some of her adventures and charitable endeavors by visiting her website,
www.DataDynamicsNW.com.
BEN CLOTHIER is a Lead Developer with IT Impact, Inc., a premier Access and SQL
Server development shop based in Chicago, Illinois. He has worked as a freelance
consultant with notable shops including J Street Technology and Advisicon, and has
worked on Access projects from small, one-man solutions to company-wide lineof-business applications. Notable projects include job tracking and inventory for a
cement company, a Medicare insurance plan generator for an insurance provider, and
order management for an international shipping company.
Ben is an administrator at UtterAccess and was a coauthor, with Tim Runcie and George Hepworth,
on Microsoft Access in a SharePoint World (Advisicon, 2011), and a contributing author for Access
2010 Programmer’s Reference (Wiley, 2010). He is a certified MySQL 5.0 Developer and a Microsoft
Certified Technology Specialist for SharePoint 2010 configurations. He has been a Microsoft MVP
since 2009.
Ben lives in San Antonio, Texas with his wife, Suzanne, and his son, Harry.
www.it-ebooks.info
GEORGE HEPWORTH began his Access career by creating tools to track sales and
exam results for his business, which created and sold training and exam materials.
Realizing that Access databases were more interesting and rewarding than writing
training materials, he soon transitioned to full-time Access development and started
his company, Grover Park Consulting (www.GPCData.com), specializing in resuscitating “owner-built” Access databases for small- and medium-sized organizations. As a
self-taught developer, George believes that any day on which he doesn’t learn at least one new thing
is a day wasted.
George is a database developer for Data and Domains, a development organization near Bellevue,
Washington, creating Access and Access/SQL Server solutions for clients in the Puget Sound region.
George is part of the administrator team, and a regular contributor, at UtterAccess, the most popular Access support site on the Internet. He is the author or contributor to several books on Access,
and a presenter at the Pacific Northwest Access Developer Group and Seattle Access Group.
George holds a BS in English and an MA in TESL from Utah State University. And now, George’s
daughter and his money go to Seattle University.
DAGI (DOUG) YUDOVICH is the Assistant Director of Departmental Computing for the
University of Washington School of Medicine. One of the department’s primary BI
responsibilities is developing database solutions using Access and SQL Server.
Doug is an Administrator on UtterAccess forums and the UtterAccess wiki. Doug
was a contributing author to Microsoft Access Small Business Solutions and the
Access 2010 Programmer’s Reference. Additionally, Doug is an active member of
the Pacific Northwest Access Developers Group (PNWADG) and a presenter in the Seattle Access
Group (SAG). Doug has been awarded the Access MVP award since 2009.
www.it-ebooks.info
ABOUT THE TECHNICAL EDITORS/
CONTRIBUTORS
JERRY DENNISON has over 20 years of professional experience in the design and
development of Microsoft Access database applications. He was one of the coauthors
of Microsoft Access 2010 Programmer’s Reference (Wiley, 2010) and a contributing
editor on other Access books. Jerry was a four-year recipient of the Microsoft Office
Access MVP award and is considered by his peers to be one of the foremost experts
on the forms of data normalization.
Jerry is the owner of TradeIt! Software Support Services, where he provides database consulting
for businesses and other Access developers. He is an automation engineer at Rexam Healthcare
Packaging, where he has worked for 22 years providing design, installation, and service support for
automated inspection and test systems.
Jerry lives with his wife of 24 years in Hixson, Tennessee.
PATRICK WOOD is the founder of Gaining Access Technologies, which provides consulting and custom software development. Originally a minister with a bachelor’s degree
in biblical studies, he decided one day while he was between churches to develop an
application to manage the many tasks involved with small- to medium-sized churches.
That sparked his interest in Microsoft Access development, which led to the founding of
his company. He learned ASP.NET to build the company website, and began developing
SQL Server and Azure SQL databases. Pat’s articles about cutting-edge technology software development have been featured on several websites. He received the MVP Award for Microsoft Access in 2011.
Pat still preaches at a small country church and enjoys taking walks, playing the guitar, hunting and
fishing, and spending time with his wife and three young grandsons.
F. SCOTT BARKER is the owner of AppsPlus, where he develops software for industries
ranging from government agencies, insurance companies, banks, medical analysis fi rms, and even for Microsoft. Scott is a former Microsoft MVP and Microsoft
employee, and was a member of the original Access team. He is also the author of a
number of books on programming techniques using Microsoft technologies.
LEO (theDBguy™) is an Access MVP and moderator of the UtterAccess (UA) Forums.
Since joining UA in 2007, Leo has made over 50,000 posts responding to questions and
solving worldwide database dilemmas. Leo is a renowned Access expert with over 17
years of experience creating complex and intuitive Access solutions. He currently works
as a Knowledge Manager for the Navy and manages the SharePoint portal for his command, which supports over 1500 sites and more than 5500 users.
Leo’s free time is dedicated to his family and to helping others leverage the powers of Access. In addition to
being an active member and presenter at the Access User Group of San Diego, he also shares his expertise
through his website at www.accessmvp.com/thedbguy and his blog site at www.thedbguy.blog.com.
www.it-ebooks.info
TECHNICAL CONTRIBUTORS
GREG LINDHORST is the Principal Program Manager for Microsoft Access. He has been a member
of the Microsoft Access engineering team since 2006, specializing in Access web apps and the programming model. Greg is a 20-year veteran at Microsoft, where he has worked on a wide range of
application development tools in Office and Visual Studio.
TOM VAN STIPHOUT is an Access MVP and the software development manager for Kinetik I.T.
(www.kinetik-it.com), a premier provider of website design, SEO Internet marketing, software
development, and computer network services and solutions in Phoenix, Arizona. Tom can be
reached at
JACK D. LEACH is an Access MVP with a strong background in the manufacturing business.
He runs Dymeng Services (www.dymeng.com), a software development company in upstate
New York, specializing in database and website solutions for small businesses. Jack can be found
on www.utteraccess.com as jleach and at
PETER DOERING is an Access MVP from Bamberg, Germany and an expert on migrations to SQL
Server as well as SQL Azure and Office 365. He’s been an independent developer on international
projects for over 20 years. Peter is an acclaimed speaker at developer conferences in Europe and can
be reached at
GLEN KRUGER is an Access MVP and the Developer/Owner of KNK Consulting, assisting clients
using Access and Visual Basic. Glen graduated from NAIT’s Computer Systems Technology (CST)
program. He is an administrator of the UtterAccess Forums, and can also be reached at
RIK HEPWORTH is a Microsoft vTSP and is the IT Director and head of the SharePoint Practice at
Black Marble in the UK. With over 20 years in IT, Rik has worked in nearly every aspect of computing. As a technology evangelist, Rik is a regular presenter at events around the UK and Ireland. He
is easiest to fi nd on Twitter as @rikhepworth.
JONATHAN SAMPSON is an IE MVP and the Director of Support at AppendTo (appendTo.com).
Jonathan is a full-stack developer who participates on stackoverflow.com and produces content for
sampson.ms. Jonathan can be found on Twitter at @jonathansampson.
www.it-ebooks.info
ACKNOWLEDGMENTS
AS A TEAM, WE WOULD LIKE TO EXPRESS our respect and appreciation for all of the people who
contributed to the content, editing, and production of this book. This project truly epitomizes the
concept of team work and community — especially the MVP community. We wanted this book to
reflect a wide perspective of expertise, but we didn’t anticipate the extent that would become. We
reached around the world to leverage the expertise and passion of more than a dozen MVPs and
experts from multiple disciplines. They invested an unprecedented amount of time, research, and
resources to create this book and all of the supporting fi les and examples. Much like creating a solution for your clients, the team has invested hundreds of hours to create or enhance developer tools
that you can incorporate directly into your fi les.
Over the course of a number of months, we conquered many hurdles, forged new connections, and
helped to expand the functionality for Access web apps. We couldn’t have done it without the timely
and invaluable efforts of our editors and technical contributors. These guys stepped up the moment
they were called upon — and yes, that often meant at a point of near panic and urgency! Whether
it was to resolve a version confl ict, expand into associated technologies, or to share tools and techniques, they generously shared their expertise and passion with the community and you, the readers.
Please take a moment to read about our contributing editors and technical contributors.
Of course, we wouldn’t have anything to write about if it weren’t for the incredible people on the
Microsoft Access team. Their passion, dedication, and commitment to continuously expand and
enhance Access are truly remarkable and inspiring. And we wouldn’t have a book without all of the
editors and teams at Wiley — Bob, Rosemarie, Mary Beth, Nancy, and so many more. Plus a very special thank you to Chris Haviland for her remarkable skills, attitude, and encouragement while guiding
us through months of reviews and production. Hmm, we’ve lost track of all the IOUs, but suffice it to
say they should include a spa day, margaritas, chocolate dipped strawberries, and many massages!
—The Authors
www.it-ebooks.info
FIRST AND FOREMOST, I WANT TO EXPRESS heartfelt appreciation to my family and dearest friends. I
am immensely grateful for the opportunities, encouragement, and support that you continue to give
me — personally, professionally, and for so many charitable endeavors. From the summit of Mt. Rainier
to Uganda, and from fundraisers to books, you help me to stay focused, energized, and positive. Life
can take us on quite a roller coaster ride filled with excitement, challenges, accomplishments, and lessons. People and life have so many facets to relish and cherish; thank you for sharing the adventures. I
also want to thank my colleagues, especially my MVP family, and everyone working on this book.
This project has been like no other. When we started planning over 12 months ago, no one could
have foreseen the amount of time and effort, or the extensive and ongoing changes, that would be
involved. On behalf of myself and the entire Access community, I want to thank Ben and George
for their vision, perseverance, and dedication to not only proving that an Access 2013 web app
can be a robust business solution, but also providing a model and guide for others to follow. At
critical moments, we also gained the invaluable expertise of Greg, Rik, and Jonathan. And to
ensure that the traditional Access solutions demonstrate multiple perspectives and signifi cant new
approaches, Doug and I incorporated content and tips from several of our MVP colleagues. Their
involvement was also instrumental in completing a second round of technical reviews and testing;
with many thanks to the Herculean efforts by Leo, who reviewed nearly all of the web chapters!
Over the months, the team has undergone major transitions. Starting with a team of four authors,
we added more than a dozen experts with a seeming exponential increase in coordination tasks.
(Talk about lessons in project management!) Fortunately, those challenges also enriched my life
with new friends as they joined our team. In working countless hours with Leo, Glen, Jack, and Pat,
I gained the utmost respect for their expertise and dedication. Similarly, it is always a pleasure to
work with my treasured colleagues, Tom, Peter, Jerry, and Scott. Your contributions helped make
our book a truly remarkable and invaluable resource for all Access users. I am grateful for being
able to share both the opportunity and the credits with so many. In recognition of the invaluable
part that they played, we have designated a new role, Technical Contributor. These are remarkable
people, so please take a moment to read their bios. This is truly a team effort and it epitomizes the
spirit of the MVP community.
With all of the turmoil on the book, I essentially took a 4+ month hiatus from consulting to support
the team. So I also want to thank my clients for understanding the delays and for working with
me to prioritize and schedule tasks so that we could meet their immediate needs and defer others.
THANK YOU!
I must also express very special, heartfelt appreciation to Christina Haviland — for her patience,
guidance, humor, and compassionate understanding. Thank you for doing whatever it took to pull
all of the pieces together to get everything to production and print! Your entryway should be overflowing with gift baskets, massage certificates, and a lifetime of gratitude.
This project has tested and strengthened us individually and collectively. We did this for you, the
Access community. Our greatest reward is helping you to help others, so it is with great pride that
we present this book. As you benefit from this compilation of resources, we hope that you too will
realize that it is indeed priceless.
This demonstrates yet again that life is fi lled with opportunities — celebrate them all!
—Teresa Hennig
www.it-ebooks.info
WITHOUT THE HELP OF MANY WONDERFUL PEOPLE, this book would not have happened. Thank
you, Greg Lindhorst, for helping us to set the parameters and providing guidance. Thank you, Rik
Hepworth and Jonathan Sampson, for your excellent contribution when we found ourselves deep
in the new and brave world of SharePoint and web development. I’m indebted to Jerry Dennison,
Patrick Wood, and Leo theDBGuy™ for their meticulous diligence. Thank you, Christina Haviland
and Teresa Hennig, for your guidance in the project. And most importantly, thank you, George
Hepworth, for putting up with me!
—Ben Clothier
THE CONTRIBUTIONS OF VARIOUS PEOPLE have been of great help in this journey. Greg Lindhorst,
Access Program Manager at Microsoft, was an early and on-going source of key information about
Access web apps. His help was invaluable. Later, when it became clear we had ventured some distance into the SharePoint realm, we were fortunate to obtain the assistance of Rik Hepworth in
shoring up that part of the narrative. We also appreciate Jonathan Sampson for his important contributions in reviewing some of the JavaScript code. I also want to thank the partners at Data &
Domains, Eric Change and Frank Wilson, for their generosity in allowing me time off to work on
this book. We also want to acknowledge the contributions of Leo “theDBGuy” and Jerry Dennison
for their excellent reviews and comments that helped make the book better.
—George Hepworth
SPECIAL THANKS to my coauthors — Teresa, Ben, and George. It’s been a wild ride, but riding along
with you made it all worthwhile. Your support during the project was nothing short of amazing.
Extra thanks to Teresa for leading the project with an unlimited amount of energy and enthusiasm.
To my fellow MVPs and friends, Tom van Stiphout and Peter Doering — thank you for your help,
insight, and input. Your knowledge seems boundless, and I’ve learned a lot from you. I’d also like to
thank Pat Wood for taking the time to solve the puzzle after fi nding a missing piece.
To Chris, our project editor, thank you for your patience and guidance throughout the project and
for being a calm port in the storm. To the technical editors, technical advisors, and anyone else who
helped iron out the wrinkles — thank you.
—Dagi Yudovich
www.it-ebooks.info
www.it-ebooks.info
CONTENTS
INTRODUCTION
xxvii
PART I: ACCESS WEB APPLICATION DESIGN AND DEVELOPMENT
CHAPTER 1: INTRODUCTION TO ACCESS WEB APPS
AND ARCHITECTURE
Deprecated Components
3
4
Access Data Projects
Jet Replication
Menus and Toolbars
Import/Export/Link to Jet 3.x and dBASE Files
PivotTables and PivotCharts
Collect Data via E-mail
SharePoint Workflow
Source Code Control Extension
Packaging Wizard
Upsizing Wizard
Creating Access Web Databases
New Components Added
5
6
6
7
8
8
8
9
10
10
11
12
Database Compare
Audit and Control Management Server
What Is an App?
How Is an App Hosted?
How Is an App Distributed?
12
13
13
15
16
App Marketplace for Publicly Available Solutions
App Catalogs for Internal-Facing Solutions
How Are Security and Trust Managed in Apps?
Setting Up a SharePoint Site for Your Apps
Setting Up an Office 365 Trial Account
Solving Business Problems
The Maid To Order Work Schedule Database
Summary
16
16
18
20
21
24
24
24
CHAPTER 2: DESIGNING TABLES
25
Creating a Blank App
Keeping Your Log Ins Straight
26
27
www.it-ebooks.info
CONTENTS
Creating Tables
29
Creating Tables Using Nouns
Creating Tables from Imported Data Sources
Creating Tables the Traditional Way
Tables and Their Related Views
Data Type Changes from Previous Versions
29
31
36
37
38
Text Data Type
Hyperlink Fields
Numeric Data Type
Date/Time Data Type
Image Data Type
Lookup Data Type
38
39
39
40
40
40
Field Properties
Linking SharePoint Lists
Summary
40
41
42
CHAPTER 3: UNDERSTANDING THE NEW USER INTERFACE
Web Navigation
45
46
Navigation Tools
The New Approach to Layout
The New Ribbon
Mobile Devices Support
SharePoint and Office 365
Creating a Web App via Team Site
Deleting Web Apps
Sharing Web Apps with Others
Summary
46
51
55
60
65
67
69
69
70
CHAPTER 4: DESIGNING VIEWS
View Design Surface
73
74
Ribbon
Tiles
Links and Creating Views
Field List
Popup Properties
Manipulating Control Placement
Duplicating a View
75
76
78
79
84
88
92
Action Bar and Action Bar Buttons
93
Action Bar Button Properties
Default Action Button
Custom Action Buttons
xvi
www.it-ebooks.info
93
94
95
CONTENTS
Controls
96
Changed Controls
New Controls
Common Properties
Client Controls with No Counterparts
Web Browser Control
Summary
96
103
108
109
110
114
CHAPTER 5: CREATING QUERIES AND WRITING EXPRESSIONS
Query Architecture
115
116
SQL Server Views
Table-Valued Functions
116
117
Changes in the Query Designer
Creating, Editing, Saving, and Previewing Queries
Action Queries
Parameterized Queries
Aggregates, Unique Values, and Top Values
Query Properties
Functions and Expressions
119
119
125
125
126
127
128
Delimiters
Operator Differences
New Constants
Data Type Inspection and Conversion
String Functions
Date and Time Functions
Math Functions
Other Functions
Availability by Context
Summary
129
129
131
132
135
139
141
145
146
148
CHAPTER 6: Creating Macros
149
Why We Need a New Web-Compatible
Macro Language
Where We’ve Been
Access’s Traditional Role as Tool of First Choice
Macro Designer
150
150
151
152
Action Catalog
Expressions and Expression Builder
Data Macro Tracing
Parameter Box
Macro Links
Interacting with the Macro Designer
153
153
154
155
155
155
xvii
www.it-ebooks.info
CONTENTS
Different Types of Macros
157
UI Macros
Data Macros
Data Macro Architecture
UI Macro Architecture
Block Macro Action
157
157
158
159
160
Creating and Editing Data Macros
Creating a Standalone Data Macro
Using the Action Catalog
Using the Add New Action Drop-Down
Using Program Flow Actions
How to Use the LookupRecord Data Block
How to Use ForEachRecord and EditRecord
How to Use DeleteRecord
Creating and Editing UI Macros
How to Use SetProperty
How to Use ChangeView and OpenPopup
How to Use RequeryRecords
How to Use Data Entry Operations
160
162
162
162
162
165
165
166
166
168
169
171
171
Using UI and Data Macros Together
172
How to Create and Use Parameters
How to Return Values
172
174
Summary
175
CHAPTER 7: DESIGNING THE TABLE STRUCTURE
New Data Types
177
178
Short and Long Text Fields
Number Fields
Date/Time Fields
Currency
Yes/No
Hyperlink
Image
Calculated Fields
Lookup Fields
Validation Rules and Text
Field Level Validation
Record Level Validation
Editing Validation Rules with Existing Data
Validation Rules Design Consideration
178
182
183
187
188
188
189
190
191
193
193
195
195
196
Leveraging Calculated Fields
197
Creating Concatenated Fields
197
xviii
www.it-ebooks.info
CONTENTS
Configuration Tables
Tally Table
Utility Table
199
199
200
Summary
200
CHAPTER 8: DESIGNING THE USER INTERFACE
Naming Convention for Web Apps
Planning the User Interface
Reusing Create, Read, Update, and Delete Views
Effective Navigation Design
Traditional Navigation Patterns
Web Design Principles
Tile-Bound View and Popup Views
Creating a Splash Screen
Designing an Index Form
203
204
205
205
206
206
211
215
216
219
List View: Searching on a field
Summary View: Searching on an Aggregated Value
Datasheet: Filtering Cumulatively
Creating a Query By View
219
223
230
237
SQL Construction
Techniques for Filtering
Design Requirements
Creating Filter Tables
Creating Data Macro to Clear Selections
Creating Query By View
Filtering Query
Building Data Macros to Populate Filter Tables
Building a Popup View to Display the Filter Results
Building a Click Event Handler
Summary
237
241
246
248
249
249
252
257
260
261
263
CHAPTER 9: SOLVING BUSINESS PROBLEMS WITH MACROS
Macro Design Considerations
265
266
When to Use Data Macros
When to Use UI Macros
On Start Macro
266
268
269
Using Freestanding Macros
270
Cloning a Record
Generating a Set of Records with Variable Parameters
Generating Records in Different Tables
Updating and/or Deleting Several Records
Using Table Events
270
278
290
294
296
Performance Considerations
297
www.it-ebooks.info
xix
CONTENTS
Preventing Deletions of Completed Records
Acquiring Default Values from Other Tables
Maintaining a History of Change
Summary
298
300
301
303
CHAPTER 10: EXTENDING WEB APPS
Integration Options
305
306
Security Considerations
Introduction to Web Services
307
310
Linking a Web App for Additional Functionality
311
Locating and Adding the Locations Mapper App
Configuring and Using the Locations Mapper App
311
315
Inlining a Web App in Access Web App
Adding a PayPal Button
Getting the PayPal HTML
Authoring a Custom Page in SharePoint Designer
Allowing Framing of Custom Page
Adding the PayPal HTML
Showing a PayPal Button on an Access Web App
Adding a Site Mailbox
322
333
333
336
338
339
340
341
Configuration for a Site Mailbox
Setting Up the Site Mailbox
Team Site Mailbox as a Shared Tool
Using APIs with a Web Browser Control
Building a Page to Handle JavaScript Code
Development Experience
Adding the Charting Page to Access Web App
Consuming ZIP-Lookup Web Services in the Client
Creating a User Account for the Web Service
Library References and Code
Summary
342
343
347
362
363
366
368
371
372
373
394
CHAPTER 11: CONNECTING TO YOUR WEB APP
Info Backstage
Connections
397
398
399
Enable/Disable Connection
Getting Connection Details
Reset Passwords
Using the Access Client
400
401
401
401
Adding VBA Code to Relink
Best Practices
xx
www.it-ebooks.info
406
409
CONTENTS
Using Excel
412
Creating an ODC Connection
Creating an Excel Table
Creating an Excel PivotChart
Creating an Excel PivotTable
External Data Considerations
Sharing Excel Workbooks on the Web
Using SSMS
412
415
416
420
421
425
430
Connecting to a Web App Database
Adding a Linked Server on the Web App Database
Querying Data in a Linked Server
Using Linked Server Programmability Objects
Summary
430
433
437
442
446
CHAPTER 12: WEB APPS IN THE ENTERPRISE
Creating a Document Library
Creating a Custom Content Type
Importing Image Files
Customizing a Library
Customizing a Library Ribbon
Version Control
Customizing an App Package
Linking to a Template File
Synchronizing Data Between App Databases
Local Differential Backup
Choosing Approaches
449
450
452
455
456
458
460
463
467
468
468
479
Summary
479
CHAPTER 13: IMPLEMENTING SECURITY MODELS
FOR THE ACCESS WEB APP
Security Considerations
481
482
File-Based Security
Agent-Based Security
Securing Web Apps on SharePoint
Security in the Application Layer
SharePoint Security
482
482
483
484
485
Team Sites and Personal Storage
Managing User Accounts
Extending Permissions
External User Accounts
Anonymous Access
486
486
490
491
492
xxi
www.it-ebooks.info
CONTENTS
Securing Web Apps in the Web Browser
Using Subsites to Restrict Users to Specific Apps
Sites and Subsites
Traditional Methods for Security in Client Solutions
Web App Linked File Security
DSN-Less Linking and Relinking
Password Storage/Non-Storage
Local SQL Server
Summary
494
498
499
509
513
514
515
532
537
CHAPTER 14: DEPLOYING ACCESS WEB APPS
Deploying Access Web Apps
Web Apps and App Catalogs
On-Premises SharePoint Server
Versioning Web Apps
Summary
539
540
540
541
551
562
PART II: CLIENT-SERVER DESIGN AND DEVELOPMENT
CHAPTER 15: MANAGING DATA SOURCES
Normalization
565
566
First Normal Form: Eliminate Repeating Groups
Second Normal Form: Eliminate Duplicate Data
Third Normal Form: Eliminate Fields That
Do Not Depend on the Key
Other Normalization Forms
Normalization Examples
566
567
567
568
568
Un-Normalized Table
First Normal Form: Eliminate Repeating Groups
Second Normal Form: Eliminate Duplicate Data
Third Normal Form: Eliminate Fields That
Do Not Depend on the Key
Primary Keys
Overview of Access Files and the Database Engine
Other Data Sources
Overview of ODBC Linking
Managing Linked Objects
Querying External Data Effectively
Linked Object Performance and Query Optimization
Passthrough Query and T-SQL
Comparing Access SQL and T-SQL
Summary
568
568
569
569
570
572
572
573
576
579
579
580
581
582
xxii
www.it-ebooks.info
CONTENTS
CHAPTER 16: PROGRAMMING USING VBA, APIS, AND MACROS
VBA
585
586
Procedures
User-Defined Functions
Error Handling
Debugging
586
586
591
596
Leveraging Queries
597
Enhancing Query Techniques
Query by Form
Creating a Query On the Fly Using VBA
API
597
604
606
608
Obtaining Documentation for API Functions
Mapping Data Types
VBA User-Defined Types and C-Style Structs
Pointers and Handles
32-Bit vs. 64-Bit
Putting It All Together: Create and Manage an Explorer Window
API Declaration
Declaring the Enumeration Function
Declaring the Callback Function
Determining the Class Name of a Window
Preparing the EnumChildProc for Two Different Uses
Creating the Main Procedure
Retrieving Window Information
Tips and Techniques
Introduction to Data Macros
609
609
610
611
611
613
617
618
619
619
620
620
621
622
624
Why Use Data Macros?
Differences in Client and Web Data Macros
Use Cases for Data Macros
Creating Data Macros
625
625
626
628
Maintaining Calculated Values to Support Indexing
Maintaining Quantity On Hand to Support Business Logic
Data Macros and VBA
Summary
628
631
640
641
CHAPTER 17: CREATING INTUITIVE FORMS
Creating Intuitive Forms
643
644
Clean Layout
Guiding the User Through the Process
Showing and Verifying Data in a Timely Manner
User-Friendly Messages and Tips
645
645
646
646
xxiii
www.it-ebooks.info