Visual Basic for Application - Microsoft Access 2003 Finishing the application.

Slides:



Advertisements
Similar presentations
Chapter 1 Databases and Database Objects: An Introduction
Advertisements

1 All Powder Board and Ski Microsoft Access Workbook Chapter 10: Database Administration Jerry Post Copyright © 2007.
With Microsoft Access 2010© 2011 Pearson Education, Inc. Publishing as Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Access.
Using Macros and Visual Basic for Applications (VBA) with Excel
Tutorial 8: Developing an Excel Application
XP New Perspectives on Microsoft Excel 2003, Second Edition- Tutorial 8 1 Microsoft Office Excel 2003 Tutorial 8 – Developing an Excel Application.
Chapter 5 Multitable Forms
By Mary Anne Poatsy, Keith Mulbery, Eric Cameron, Jason Davidson, Rebecca Lawson, Linda Lau, Jerri Williams Chapter 9 Fine-Tuning the Database 1 Copyright.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Compile MS Access Pertemuan 18 Matakuliah: F0712 / Lab MS Access Tahun: 2007.
Chapter 1 Databases and Database Objects: An Introduction
Microsoft Access Project Five Enhancing Forms with OLE Fields, Hyperlinks, and Subforms.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 7: Advanced File System Management.
Access Tutorial 1 Creating a Database
70-270, MCSE/MCSA Guide to Installing and Managing Microsoft Windows XP Professional and Windows Server 2003 Chapter Nine Managing File System Access.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 7: Advanced File System Management.
Microsoft Office Access 2013 Microsoft Office Access 2013 Courseware # 3255 Lesson 6: Protecting, Maintaining and Managing Databases.
Access Tutorial 3 Maintaining and Querying a Database
Microsoft Access 2007 Microsoft Access 2007 Introduction to Database Programs.
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Tutorial 8 Managing and Securing a Database. Objectives Filter data in a table and a form Save a filter as a query and apply the saved query as a filter.
MS Access Advanced Instructor: Vicki Weidler Assistant:
Microsoft Office 2007 Access 2007 Chapter 9 Administering a Database System.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 7: Advanced File System Management.
Microsoft Access Intro Class 1 Database Concepts.
CHAPTER 9 DATABASE MANAGEMENT © Prepared By: Razif Razali.
Building The Database Chapter 2
FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.
Chapter 2 Querying a Database MICROSOFT ACCESS 2010.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 12 1 Microsoft Office Access 2003 Tutorial 12 – Managing and Securing a Database.
1 CA201 Word Application Increasing Efficiency Week # 13 By Tariq Ibn Aziz Dammam Community college.
Chapter 1 Databases and Database Objects: An Introduction
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 7: Advanced File System Management.
DAY 14: ACCESS CHAPTER 1 Tazin Afrin October 03,
Microsoft Access 2003 Define some key Access terminology: Field – A single characteristic or attribute of a person, place, object, event, or idea. Record.
1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Access 2010 by Robert Grauer, Keith Mast, Mary Anne Poatsy Chapter.
A Skills Approach Access 2010 Getting Started with Access 2010 © 2012 The McGraw-Hill Companies, Inc. All rights reserved Chapter 1.
Microsoft Office 2007 Access Chapter 3 Maintaining a Database.
Microsoft Access 2010 Chapter 10 Administering a Database System.
Microsoft Access 2013 ®® Tutorial 10 Automating Tasks with Macros.
Microsoft Access 2010 Chapter 8 Advanced Form Techniques.
COMPREHENSIVE Access Tutorial 12 Managing and Securing a Database.
® Microsoft Access 2010 Tutorial 12 Managing and Securing a Database.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 3 BACKNEXTEND 3-1 LINKS TO OBJECTIVES Modify a Table – Add, Delete, Move Fields Modify a Table.
Creating Macros in Excel Adding Automated Functionality to Excel & Office Applications.
Microsoft Access 2013 ®® Tutorial 12 Managing and Securing a Database.
1 All Powder Board and Ski Microsoft Access Workbook Chapter 9: Database Administration Jerry Post Copyright © 2003.
Microsoft Office 2013: In Practice Chapter 2 Using Design View, Data Validation, and Relationships Copyright © 2014 by The McGraw-Hill Companies, Inc.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
INSERT BOOK COVER 1Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Getting Started with VBA for Microsoft Office 2010 by.
Access Lesson 14 Creating Database Security and Documentation Microsoft Office 2010 Advanced Cable / Morrison 1.
1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Access 2010 by Robert Grauer, Keith Mast, and Mary Anne.
Securing and Sharing Workbooks Lesson 11. The Review Tab Microsoft Excel provides several layers of security and protection that enable you to control.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 6 1 Microsoft Office Access 2003 Tutorial 6 – Creating Custom Forms.
DAY 14: ACCESS CHAPTER 1 RAHUL KAVI October 8,
® Microsoft Access 2010 Tutorial 9 Using Action Queries and Advanced Table Relationships.
® Microsoft Access 2010 Tutorial 8 Managing and Securing a Database.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
ASP.NET Programming with C# and SQL Server First Edition
Excel Tutorial 8 Developing an Excel Application
Exploring Microsoft® Office 2016 Series Editor Mary Anne Poatsy
Tutorial 8 Managing and Securing a Database
Objectives Create an action query to create a table
Lesson 6: Protecting, Maintaining and Managing Databases
Microsoft Office Access 2003
Access: Access Basics Participation Project
Chapter 1 Databases and Database Objects: An Introduction
Tutorial 12 Managing and Securing a Database
Presentation transcript:

Visual Basic for Application - Microsoft Access 2003 Finishing the application

2 Copyright © CIST Introduction After working so hard to develop an advanced Access application using VBA, it is important to make sure that the application is capable of performing well and handling the number of users you expect. You also want to make sure that the end users are not able to modify the database source code and design without the proper permission. After you have fine-tuned, secured, and tested the application, you are ready to implement the application by distributing it to end users. However, after you distribute the application to end users, your job is still not finished. Access applications need to be backed up and compacted periodically to ensure that they remain in good working order and that they can be recovered from a backup if corruption or deletion occurs.

3 Copyright © CIST Optimizing Your Applications General Design Guidelines to help improve the actual performance of your applications: –Minimize the code and objects in a form. Move the code to a standard module. The more complicated a form is, the longer it takes to load. –Minimize the use of subforms because two forms are in memory. –Write reusable modules that so you are not rewriting the same code in slightly different ways multiple times. This reduces the amount of code in your application and helps improve speed. For example, instead of having one procedure that enables all controls in one form, another that disables all controls in another form, and two others that disable controls in each of those same forms, write a generic module that enables or disables all controls on the specified form based on whether the enable or disable flag is passed as a variable. –Eliminate code that is not used. –Make sure that your application is compiled. Also, consider compiling your application into an ACCDE file as described later in this chapter. –If you have all the user-interface objects in one database and the data tables in another (Access or other) database, open the database with the user interface exclusively for faster performance

4 Copyright © CIST Optimizing Your Applications Improving Data Access: –Minimize the number of database connections open. For example, if you use a bound form, it maintains a constant connection to the database. Consider switching to an unbound form that connects to the database to retrieve the data, disconnects, and reconnects when it needs to update the data. –Use a query as the source of a form, control, or ADO recordset that returns only the rows you need to work with instead of opening an entire table. –Make sure that your query is written correctly. For example, make sure to retrieve only the columns that are being used. Also make sure that you are using the correct type of join. –Make sure the type of cursor being used is not more than you really need. For example, if you are not modifying the data, use a read-only cursor. –Use proper indexes on the tables to reduce the number of table scans. Add indexes to the fields that are used to join tables together and are frequently used to retrieve data. This will save Access from having to perform a scan of the entire database to find the desired record. However, do not add indexes on every field in the database. This will actually degrade performance more than having no indexes at all.

5 Copyright © CIST Optimizing Your Applications Running the Performance Analyzer: –Access comes with a Performance Analyzer utility that will analyze the selected objects and make suggestions to help improve the speed. You must have the database you wish to analyze open in order to run the analyzer. –Select Database Tools and then click on Analyze Performance in the Analyze ribbon. –Select the All Object Types tab. Click the Select All button and then select OK. This selects all the objects in the database to analyze. The analyzer runs, and a screen is displayed, which makes various suggestions on ways to improve the performance of the application.

6 Copyright © CIST Securing Your Application You have various ways to add security to your application. You can implement one or more of these techniques, depending on the type of security that is required for your application. Adding a Database Password: –One way to add security to your database is to require a user to input a password before the database can be opened. This is called file-level security. After the database file has been opened by specifying the correct password, the user can do anything to the database unless the other security features are implemented. –To do it, select the Database Tools ribbon Encrypt with Password option. You will be prompted to enter a password for the database. Adding a Password for VBA Code: –Adding a password to the database as described in the prior section does not keep the user from seeing your source code. –To add a password for the VBA code, open the Visual Basic Editor. Then, select Tools ProjectName Properties. Select the Protection tab and Specify the Lock Project For Viewing option, and fill in a password that must be specified in order to view the source code.

7 Copyright © CIST Securing Your Application –After you click OK, the specified password will be required in the future before the source code can be viewed or modified. Encrypting a Database: –Even after you add to your application the security features discussed so far, your application is still not totally secure. Someone could still view the contents of the database with a tool that can view partitions on disk and decipher data. –To do so, select the Database Tools ribbon and then Encode Database in the Database Tools group. Access then prompts you to specify a password. After you click OK, the entire database will be encrypted. In order for you to use the application after it has been encrypted, Access will have to decrypt the information. This means that encrypting the database will slow down performance as much as 20%. If this performance degradation is a problem for your application, decryption is not a good option.

8 Copyright © CIST Maintaining the Application Just because you have deployed your application to end users does not mean that your job is finished. It is important that you periodically compact the database to keep it in good working order and that you make periodic backup copies. Compacting and Repairing the Database: –You can compact and repair Access databases to reduce the amount of space they take up and to repair problems if Access discovers any. –To compact and repair an Access database, select the Office Button Manage Compact and Repair Database. Making Backup Copies of the Database: –It is very frustrating to lose the data and have to recreate it again. The same concept holds true for your Access applications. Access databases are file-based, which means that a lot of the information is contained in the single ACCDB file. Because so much is contained in a single file, and because it would be easy for a user to delete the database file from the network, it is extremely important that you make periodic backups of both the database tables and the user interface. –To back up an Access database, select the Office Button Manage Backup Database. You will be prompted to specify a file name and path where you want the backup saved. Click OK, and the backup copy will be created.

9 Copyright © CIST Any Question?

10 Copyright © CIST The End