Unformatted text preview:

Put Final Touches on an Application Callahan Chapter 11 Preparing Your Application for Distribution Controlling How Your Application Starts Forms based every VB procedure has an On Error statement to enable error handling Error event is handled for each form report typically a Switchboard or a frequently used data entry form Test test test Custom Ribbon menus Custom Help ToolTips Status Bar Prepare application for network use and maintenance split file architecture Security options Designate a startup form Ensure errors are handled bound forms for data presentation dialog boxes Switchboard for inter form navigation encrypt and password protect deploy multiple front ends deploy front end as an ACCDE MDE Handle multi user issues coming soon Customize the application s startup appearance hide Navigation Pane Title Bar caption customized Ribbon 1 Providing a StartUp Form for Your Application Switchboard form purpose contents Add a command button to exit the application needed to tweak Wizard s code since the Switchboard has no RecordSource unbound the Dirty property not available http support microsoft com kb 121677 Private Sub QuitApplication Click On Error GoTo Err QuitApplication Click If Me Dirty Then Me Dirty False DoCmd Quit delete to prevent an error Exit QuitApplication Click Exit Sub Err QuitApplication Click MsgBox Err Description Resume Exit QuitApplication Click End Sub Providing a StartUp Form for Your Application Changed several form level properties Caption AllowDatasheetView ScrollBars RecordSelectors NavigationButtons AutoCenter BorderStyle 2 Make Your Switchboard Form Open Automatically StartUp Options actions that take place automatically when the database is opened File Options Current Database each can also be set using VBA code can bypass by holding Shift as DB opens can create a custom database property called AllowByPassKey to take away this capability Startup Options used in Callahan 11 Application Title designate a caption for Access window s title bar Display Form designate which form to open as application loads Display Navigation Pane cleared this so Navigation Pane would be hidden why hide Navigation Pane Practice Time Use Startup Options in Artie s List mdb to provide an application title of Artie Enterprises Inc disallow special Access keys disable Layout View disable Design Changes display the Navigation Pane we don t have a Switchboard form yet designate frmRestaurant as the initial form to be displayed do not allow full menus disable shortcut menus Test your startup options close and reopen Artie s List mdb close and reopen Artie s List mdb while holding Shift key to test bypass test confirm each startup option above 3 File Server Approach Supports multiple concurrent users ACCDB MDB file stored in a shared network folder All processing is done on user s workstation where Access ACE Jet run review from Balter 1 eg open an MDB file in a shared folder run a report whose record source is a query the query definition report definition and entire table of data come down network to workstation where ACE Jet runs the query applies criteria passes results to Access to format as specified by report s definition a performance bottleneck Lots of network traffic especially problematic when lots of users File Server Approach Subscription Data mdb Enhancement Subscription mdb Split file Architecture back end database file has data tables place it in a shared folder on the network one shared set of tables that multiple users can access front end database file aka the application database has queries forms reports macros modules static tables links to production tables can have links to multiple back ends deploy a copy on each user s workstation performance is enhanced only tables travel the network eg open a local application database MDB ACCDB file run a report whose record source is a query the query definition and report definition are already local table links are used to connect to back end file entire table of data comes down network to workstation where ACE Jet runs the query applies criteria passes results to Access to format as specified by report s definition 4 Split the Subscription Database into Two Files Advantages data is sharable via the network improved performance since queries forms reports macros modules are stored locally there is less network traffic system is more responsive only the data tables travel over the network application maintenance is independent of the data back end is the common data source reduces network load since front end object definitions are local developer can modify the application front end without disturbing the existing application and data Disadvantages when rename move delete the back end file the front end won t be able to access any data alternative fixes coming up linked tables lack some functionality can t use Table type recordsets Seek method modify linked table s structure Database Splitter Exports tables to a new back end file then sets up links so back end tables can be accessed by objects in the front end application database Database Tools Move Data group Access Database Practice Time exit Access and backup your Artie s List yourname mdb by copying it rename the copy as Artie s List yourname BEFORE DB SPLITTER mdb write protect Artie s List yourname BEFORE DB SPLITTER mdb open Artie s List yourname mdb and use the Database Splitter create the back end in your CIS217 Data Files Others folder and name the back end file Artie s List yourname DATA mdb notice the link icons for tables in the front end ToolTip reveals path in back end 5 Checking and Fixing Linked Tables When rename move delete the back end file the frontend won t be able to access any data until the links are updated demo Three ways to fix broken table links delete each linked table then External Data Access Link use Linked Table Manager to re establish links right click a linked table Linked Table Manager or Database Tools Linked Table Manager demo use VBA to have user point to back end file then rebuild the table links Callahan s CheckLinks function Add Code to Check and Fix Linked Tables Use VBA to have user point to back end then rebuild table links Public Function CheckLinks As Boolean Check linked tables relink if necessary Returns true if links are okay or links are successfully refreshed On Error GoTo CheckLinksErr Dim tdf As TableDef Dim strNewMDB As String Dim fd As FileDialog Loop through each table in the current database Loop


View Full Document

SCC CIS 217AM - Callahan Chapter 11

Loading Unlocking...
Login

Join to view Callahan Chapter 11 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Callahan Chapter 11 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?