Access 97 for Access 2 users

(last updated 11 November 1998 - import errors)

Contents

Minimum System Requirements for Microsoft Office 97 Professional

Keeping an existing version of Access

To keep Access 2 in addition to Access 97, run the Microsoft Office Upgrade Wizard located in \ValuPack\OffClean\OffCln97.exe. In the Upgrade wizard, select the Let Me Decide which Office Applications will be removed option.

Default Folders

\Program Files\Microsoft Office is the default root folder for an Access installation. All sorts of folders are opened below this, most notably in Office are the executables, Office\Bitmaps the various bitmaps for different applications, Office\Samples for Northwind and Solutions databases, Templates\Access for HTML templates, Templates\Databases for the complete database wizards. Dynamic libraries end up in WindowsNT\System

Features not installed in typical installation

Converting Access 2 databases to Access 97

Overview

When you open a database in Access 97 created in an earlier version of Access, you normally want to convert it to Access 97. Although you can enable an earlier version database without converting it, you cannot use Access 97 to change the design of any objects, nor take advantage of new features in Access 97 until you convert it.

Once you convert a database to Access 97, you cannot open it with earlier versions of Access, and you cannot convert it back. You must consider when to convert your database, especially if you share it with users not all able to upgrade to Access 97 at the same time. Always make a backup of your database before you convert it.

Most earlier-version databases convert to Access 97 with no difficulty, but sometimes new features can conflict with existing objects and code in the converted database. This document summarises problems you may encounter when you convert your database. Problems associated with less used facilities are listed at the end of this document. For information about database conversion issues, search the Access 97 Help Index for "converting databases," or use Office Assistant. You can also find information about conversion issues in Acread80.wri and network installation in network8.txt files in the Access program folder.

Conversion Process

Any attempt to open an Access 2 database will lead to being asked if you want to convert the database and the conversion process described below will begin: Additional steps of recreating the workgroup information file must be taken if the database has been secured (see help "Convert a workgroup information file") otherwise security appears to be lost. Multiple versions of Access can share the same workgroup information file (System.mda or System.mdw) as long as the workgroup information database remains in the lowest version format.

Common Conversion and Installation Problems

General

Database with large number of form, report, and module objects increases in size

Access 97 databases store form, report, and standard module objects differently than earlier versions. When you convert an Access 2.0 database with a large number of these objects, the Access 97 database may increase dramatically in size. (The students database decreases in size from 224 Kb to 204Kb).

To minimise increase in size of a database, Access 97 converts forms or reports without class modules associated with them to lightweight objects.

You can also reduce the size of your database by converting it to an MDE file (a database from which all source code has been removed, and only compiled executable code remains) using a tools utility.

Databases with Large Numbers of Modules

When you convert an Access 2.0 database with a large number of forms, reports, and modules, conversion may fail with one of the following error messages:

Can’t create any more class modules or Out of Memory

Access 97 has a limit of 1024 Visual Basic for Applications modules. The use of lightweight forms and reports reduces the impact of this limitation.

If your database fails to convert because it has too many objects, reduce the number of objects in your database. Consider dividing your application into multiple databases or using library databases to store your code.

Tables

Tables with Large Numbers of Indexes or Relationships

When you convert an Access 2.0 database containing a table with more than 32 indexes and relationships combined, conversion fails with a message indicating that the limit was exceeded (Access 2.0 allows a table to have up to 32 indexes and virtually unlimited number of relationships). Reduce the number of indexes or relationships and convert the database again. Version 3.5 of the Jet engine creates indexes on both sides of relationships between tables for efficiency.

Names

Now is a really good time to check the names of tables and fields since any containing square brackets and backquotes will not convert. It is also very bad practise to have field names containing arithmetic operators and any sort of bracket since they cause enough problems in Access 2 let alone Access97. To find references to the old name select Analyze from the Tools menu and click Documenter. Avoid fieldnames which are used by Access internally such as: AddREf, Date, GetIDSOfNames, GetTYpeINfo, GetTypeInfoCount, Invoke, Name, QueryInterface, Release, AddressOf, Assert, Decimal, DefDec, Enum, Event, Friend, Implements, RaiseEvent, WithEvents. These will cause conflicts or unexpected behaviour when referenced in expressions. The message There were compilation errors during the conversion or enabling of this database will be displayed

Datatypes

The counter data type is replaced by the autonumber data type.

Importing, linking and attaching

The format of Access 2 and 97 databases and objects are different.

You can import and link Access 2 objects into Access 97 database, but not link or import Access 97 objects into an Access 2 database (results in a message stating that the database is corrupt or not an Access database).

You can export an Access 97 table into an Access 2 database (and vice versa) but fields with the new hyperlink data type will be converted to a memo data type, lookup property settings will be lost, and autonumbers will be set to counter (which can only be incremental- so the new random and replicationid facilities are lost).

Remember that if you are using ftp to get comma-separated text you will need to transfer it as ASCII rather than binary to get the correct linefeeds otherwise it will not load into Access97, Another work-around is to read the data into a Word file, and write it out again as Text with Paragraph Markers. Then it will input OK.

Note that importing from Excel files can have problems: if a field is longer than the field it is being imported into then it will truncate without warning.

Note also that if a record will not import properly you no longer get an Error table identifying which records are incorrect- the record will be loaded with the offending cells left blank. The warning message gives no clue as to which records are faulty, so if your import file contains missing data anyway it is impossible to distinguish the incorrect files.

Since the data files are text files, the file must have filetype csv (comma delimited), asc (ASCII) or txt (plain text file- could be fixed length or delimited) for the wizard to make assumptions about the format. Giving it the filetype dat will not show the name of the data file unless the registry is edited (look for importfilter) or the set up program is run:

To import the monthly finance data, the import wizard correctly surmised that the file was fixed width but since it looked for spaces between fields got the specification wrong.

In Access 2.0, the TransferText Command, when embedded in a macro, does not require a Specification to be set. When the database was converted, all attempts to run the import macro failed (the message given re-the failure was not particularly helpful), although one could import the file manually using the Get External Data | Import options.

Two changes were required to get TransferText command to work.

1) The file from which the data is imported needs to be one of the predefined types as described above.

2) A specification must be created for the import file. This involves a dry run of the File | Get External Data, Import option. The documentation refers to the Advanced Wizard. This is confusing as the Advanced button occurs on two successive screens and it is the second of these which is required. Having selected the file for import on the

first import screen, and clicked the Advanced button from the second import screen, a specification is created for the import based on the selected file.

Note- The specification refers to the fields as Field1, Field2,... When the import occurs Access tries to match the fields with the fields in the destination table which obviously have more meaningful names! Before saving the import specification, the field names should be reset to the actual names in the destination table. Finally the specification can be saved. Once the specification has been created, it can be selected for the TransferText command in the macro.

The other problem is that indexes are ignored if TransferText is used rather than Import.

Queries

SQL button

The SQL button has vanished so one has to select SQL from the View menu

Queries with Date Criteria Between 1900 and 1929

If you use a literal date specifying the years 1900 through 1929 as part of your criteria in a Access 2.0 query, the query may return different results after you convert the database to Access 97. This happens because new interpretation of year dates ending in the digits 00 through 29 places them in the next century.

You may even see different results from the same query if it is run on an enabled database.

For example, a literal date criteria of #01/01/15# in Access 2.0 represents January 1, 1915; the same date criteria in Access 97 represents January 1, 2015.

To work around this difference, modify the criteria to specify the correct century, for example #01/01/1915#.

One could also use the cdate function to force conversion to a date

Cdate will show the current century

It is recommended to always show the 4-digit year by changing date format in Regional Settings from the Control Panel.

Forms

Datasheet View

The datasheet view button has vanished- only obtainable from the view menu

Control Names

A control name differing only by a space or symbol is not allowed. Thus if one has a control called [last_name], then you can not have a control called [last name] or [last+name]

Combo Boxes

Access 97 combo boxes now always accept null values when LimitToList is set to true whether or not the list contains null values.

Access 2 would have given the error message The text you enter must match a value in the list

Wizard-Generated Code

Access Basic code in your database generated by a Wizard may need to be modified when you convert your database, specifically those calling another application. The Access 2.0 Command Button Wizard generates code for buttons shelling to Microsoft Office applications that does not work in Access 97. Remove these buttons in your converted database and recreate them using the Access 97 Command Button Wizard. The code may reference functions in Utility.mda which are not in Wzmain80.mde library databases.

Command Buttons

Some of my buttons had to be made bigger since the spacing was changed so the button was not large enough to show the text. This was confusing since the font was still System 10 so should have stayed the same. The default font for new buttons is now Haettenschweiler 12

Some of the button pictures have changed, so if for example if you want to create an exit button it will no longer have the closing door icon but a stop symbol. This could make applications look inconsistent if new forms are added later. Existing button images do not change because they are stored in the Picture property of the control.

Field widths

I had to make some of my fields bigger since the format changed from Sans Serif 8 to Ariel 8.

Hidden columns

An extra step has to be taken to hide columns in a form.

Graphs

I had to recreate many graphs especially those that were not bar charts, and ones that were linked to each data record so it is a good idea to print a copy of each type of graph and its definition before conversion as a reminder particularly if one has no access to Access 2 later.

Form and Report Templates

To use a template from Access97, the form or report must be converted to Access97 format. To specify a template for forms and reports (specifies which sections to have, dimensions, default property settings, does not create any controls):

Reports

Forms or Reports with Large Numbers of Controls

When you convert an Access 2.0 database that contains a form or report with a large number of controls, the conversion may fail with the following error message:

The form or report ‘ObjectName’ has too many controls.

You must reduce the number of controls on the form or report and then convert the database again. Visual Basic for Applications, imposes the limit on the total number of controls, fields and sections on a form or report to 754. This limit does not exist in Access 2.0 .

16- and 32-bit ActiveX Controls (OLE Custom Controls)

When you convert a database that uses 16-bit ActiveX controls (formerly known as OLE controls) eg Word, Excel, Graph, Paintbrush designed for Access 2.0, Access 97 does not convert them to their new 32-bit equivalents. You must manually insert an equivalent 32-bit ActiveX control and recreate its event procedures after you convert the database.

Conversion Fails Without Default Printer

If you attempt to convert a Access 2.0 database that contains form or report objects, and your computer does not have a default printer installed, you receive the following error message, and the database fails to convert:

You must set a default printer before you design, print, or preview.

To resolve the error, set up a default printer on your computer and convert the database again.

Report Margins Adjust to Printable Region

If you have a report in an Access 2.0 database with top, bottom, left, or right margins set to zero inches, after you convert the database, you may see the margins changed to the minimum default margin defined by your printer driver resulting in split pages. Reduce the width of the report to avoid it splitting.

Saving Report as RTF file

When one saves a report in RTF format (using Officelinks icon or save as from the File menu) so that it can be opened in Word, the appearance in Word vastly different from the Access printout due to the fact that a different algorithm is used to calculate the row height and field length in Print Preview and Output. Thus, a times roman 10 field that was specified 1.0083" long and .375" from top of page in the report design and with a vertical space of .192" from the next field will in an rtf file from Access 2 be printed as 1 line .935" long and 1 blank line. In Access97 rtf, part will be printed .5625" on the first line, and the remainder on the next line.

If one uses "format to fit" in the vain hope that the problem will cured, the remainder will be truncated. Rules for "successful" rtf documents:

The only solution to get the field printing without being split over 2 lines was to increase the size of the field but it is difficult to know what to set it except by trial and error and it is not always practical to increase the width anyway. The other solution is to not output to Word!

Northwind Reports need Arial Narrow font

When the Catalog, Invoice and Sales By Category reports are previewd or printed, some of the text will be truncated if Arial Narrow font is not installed. This can be installed from the Office 97 ValuPack

ForceNewPage Property in Group Section

In Access 2.0, if you set the ForceNewPage property to Before Section in a Group Header section on a report, the setting does not force a page break before the first group section, whereas in Access 97 it forces a page break before every section, including the first group section encountered in the report.

Modules

Visual Basic for Applications replaces Access Basic. In most respects it is identical and most of the necessary conversions are made automatically. Some of the changes you need to be aware of are listed below, others are outlined at the end of this document.

Conflicts with Reserved Words

In Access 97, module names cannot be any of the following reserved words:

Similarly, if you have set a reference to a type library such as Excel, a module can not be called Excel.

An attempt to convert an Access 2.0 database containing a module with one of these names, may cause conversion to fail with a message indicating an invalidmodule name. To correct the error, rename the module and convert again. If the conversion does not fail. the original name will have an underscore appended to it., e.g. Forms will have the name Forms_ so if called by another object, then that object will have to be altered to reflect the new name. To find references to the old name select Analyze from the Tools menu and click Documenter

Standard /Class Module Name Conflicts

In Access 97, form and report (class) modules share the same name space with standard code modules which are available to other procedures. For example, for a form named Form1, Visual Basic for Applications creates a class module Form_Form1, which means that a standard code module can not be named Form_Form1. Similarly avoid Report_ prefix for report modules.

An attempt to convert an Access 2.0 database with a standard code module name that conflicts with a class module name, causes conversion to fail with a message indicating that the module name is invalid. To correct the error, rename the standard module and convert the database again. It is a good idea to always prefix a procedure by its module name.

Module /Procedure Name Conflicts

If the Access 2.0 database contains a procedure and a module with the same name, the procedure fails in Access 97 with the following error:

Expected variable or procedure, not module

Resolve this error either by changing the name of the module so it does not conflict with any procedure names, or change the converted database to call the procedure using ModuleName.ProcedureName syntax.

International dates

Visual Basic treats dates inconsistently, ignoring the regional settings if a literal date makes sense in American format. For example, with a British date setting (dd/mm/yy) in Control Panel, enter these two calculations in the debug window:

? #23/12/96# - #20/12/96#

? #13/12/96# - #10/12/96#

The first yields 3 days, but the second 62! Visual Basic interprets #13/12/96# as 13-Dec-96, but #10/12/96# as 12-Oct-96. Access Basic (ver. 1, 2) always respected the Control Panel setting and did not have this inconsistency. The solution is to state the month explicitly eg #13 dec 96#. This problem only applies when using Visual Basic not to a query.

Web Browser

If Microsoft Internet Explorer is removed, and Netscape Navigator installed, then the message:

Unable to open file. No program registered to open this file

Connection Timeouts

If you are using ODBC to link tables, Access tends to fall over since it closes connections to the external data after 10 minutes even if the datasheets and forms that display remote data are still open. It then tries to automatically reconnect, but forgets the password. General protection faults and strange messages can then occur.

Network Installation

Make sure you have your own copies of the wizards and system file: Copy them in an Access work directory and make sure the registry points to them rather than the network files.

What is confusing in Access 97 for the Access 2 user

What is new in Access 97 for the Access 2 user

Introduction

Access for Windows 95 introduced Table and Performance Analyzers and Replication. Access 97 introduces web facilities, easier filters, more wizards, drag and drop facilities. Performance should be better (provided there is enough RAM) due to being a 32-bit application. Start-up options are improved. Record locking is still performed by 2K page but multiple users can add new records at once. Passwords are now displayed as stars.

Office Assistant

Office Assistant is an animated character that allows a user to access help easily and to receive tips and suggestions about using Access 97. It allows you to type keywords for your search and will respond with the topics covering those topics. It can get annoying. If you close the Assistant you can open it again by clicking the question mark icon at the right of the toolbar. Every now and then a light bulb will flash to impart a good tip. Relevant topics about tips are shown that you can select by pressing the blue button by the side of each topic

Context sensitive help is still available with the F1 key, but the question mark that used to show screen tips in Access 2 is now found on the top right corner of dialog boxes. Press this question mark and then click the item to get a brief screen tip.

New Help menu commands

Database Wizard

The Database Wizard in Access 97 includes more than 20 customisable templates (with filetype mdz) to create full-featured applications with a few mouse clicks. There are templates for addressbook; asset tracking; book collection; contact management; donations; event management; expenses; household inventory; inventory control; ledger; membership; music collection; order entry; picture library, recipes; resource scheduling; students and classes; time and billing; video collection; wine list; workout. Users can choose what information they want the application to track, and the wizard will build custom applications, creating all the tables, queries, forms, reports and modules needed.

This may sound a good idea, but the applications are often far more complicated than needed (but pretty!), and extensive modifications may be needed. For example, addresses have zip codes; telephones have masks that are not suitable. If data is already available it may not be possible to import it because the database structure is far more complicated than one's own data structure. One can also spend ages looking at each object and trying to figure out what it is for, or why certain things magically happen. It is easier to start from scratch

Spell Check Wizard

Ensure the data stored in Access tables is spelled correctly by using the Spell Check Wizard. The spelling dictionary is shared across all Microsoft Office applications so that user additions need only be defined once, regardless of which Microsoft Office application is being used.

AutoCorrect

Use AutoCorrect to automatically correct text that you frequently mistype, and to automatically replace abbreviations with long names. For example, you can create an entry "UOB" for "University of Bristol". Whenever you type UOB followed by a space or punctuation mark, Access automatically replaces "UOB" with University of Bristol. AutoCorrect definitions are shared with the other Microsoft Office applications so pairs need only be defined once.

AutoCorrect will not correct text that was typed before you selected the Replace Text As You Type check box.

If you actually want "UOB" to appear, clear the Replace Text As You Type box, type UOB in a field and save the field by moving to another record. Then select the Replace Text As You Type box again.

Drag and Drop

Moving information to other Microsoft Office applications is now as easy. Copy and Paste may be used from the Edit menu

Right Mouse

Clicking on the right mouse button displays a menu of the most commonly needed options for the item clicked on such as copying, pasting, sorting, filtering, properties. It can be used in design or display view. When you can not see a menu for what you want to do, it is worth right-clicking.

View menu

The View button on the toolbar makes it easier to find out more about database objects, and switch to other views of a database object

Zoom

If you are entering an expression that is longer than the standard input area in a property sheet, a design grid, or a macro action argument, you can type the expression in the Zoom box. To open the Zoom box, press SHIFT+F2 when the focus is where you want to enter the expression.

Compacting and Repairing

You can now use the compact and repair database commands (from the Tools/Database Utilities menu) on the currently open database

Desktop Shortcut

Create a shortcut to individual database objects by dragging and dropping, or by right clicking an object. Double click on the shortcut to open the database and object. The icon will not be the Access icon but the object icon

Tables

Datatypes

Lookup Wizard

Used to create a field that looks up data from another table in Design view. Useful for building lookup properties for foreign key fields

When you click the Finish button, Access creates the Lookup field and sets certain field properties based on the choices you made in the wizard. For information on the properties that the Lookup Wizard sets:

Once you have created a Lookup list field, if you add the field to a form, Microsoft Access copies its definition into the form so combo or list boxes will be created automatically.

If you change the definition of a Lookup or value list field in the table after adding it to a form, those changes will not be reflected in that form. To correct this, delete the field from the form and then add it again.

Lookup Display Control

Fields have a property (shown on the lookup tab) to define the default control type (text box, list box or combo box), used in datasheets and new forms. It is also possible to add a Lookup field to a table that displays values from the same table that contains the Lookup field (the lookup wizard does not allow this).

Sort Order

Tables have a property that specifies the default sort order to use when the table is browsed in a form or datasheet.

Relationships Window

Table Analyzer Wizard

The Table Analyzer Wizard can decipher flat-file data from a wide variety of data formats and create a relational database that stores the original data but eliminates the problems associated with nonrelational data. It automates the "normalisation" process and makes a recommendation for splitting the original table into relational tables that users can accept or customise. It describes problems such as mis-spelled names and wasted space due to repeated information The wizard recommends not splitting the table

Import Table wizard

The new wizard analyzes the target data and allows the user to decide what and how the data should be imported into the database. It determines what format the data is in (but does ask for confirmation).

Access 97 does not ask if the fieldnames are the first line of the file for Word for Windows mail merge data files because the first row must contain the field names.

When you export an Access table or select query to a delimited or fixed-width text file, Microsoft Access inserts the field names of your table or select query into the first row of the text file if you have selected Yes for this argument.

Intelligent? Table Design

Access now allows users to define new columns or delete old columns while working with their data in datasheet view. For new tables defined this way, appropriate datatypes are determined based on the information that is entered into each column. In addition, Access will add indexes automatically where appropriate.

In practise, I think that if you know you are adding a new column, then you should go into design and do it yourself to enable correct field lengths to be set, and the correct fieldname

Application Splitter Wizard

The Application Splitter Wizard separates an Access application from its tables and creates a shared database containing the tables for a multi-user application. The data is then shared, and each user can set up their own applications for that data. This also avoids network traffic.

Incidentally, for a shared database to be updatable, its properties should be set to Archive

Background Joins

Background Joins enable users to simply select the fields they want on their forms, queries and reports. Even if relationships have not been created between tables, Access automatically creates joins if you add two tables to a query and the tables each have a field with the same or compatible data type and if one of the join fields is a primary key. Other tables may be included automatically, if they are needed to relate the desired data. You can enable or disable these automatic joins.

(If automatic joins disabled, you can still create joins yourself. This setting applies to new queries only.)

A relationship is automatically drawn between the 2 tables

Filters

Access 97 makes it easier to find information by using a form or datasheet to formulate the filter visually. All forms now have a Filter by Form mode wherein users can type the information they seek; Access builds the underlying query to deliver the data, in a form view. This means that Access filters can now be used from tables, queries, forms and subforms whereas before they could only be used from forms. The filter is saved when the form, query or table is closed, so one can open that object again and apply (the third filter icon) the last filter used -which is why it asks if the last changes are to be saved when one has not apparently made any changes to the design.

The ApplyFilter and Filter event have been added to forms and reports

Filter by Form

Access 97 makes it easier for users to find information by using a form or datasheet to formulate the filter visually with drop down boxes

A drop down box appears

Filter by Selection

Access for Windows 97 allows users to locate information quickly on forms or datasheets by highlighting a selection and filtering the underlying data based on that selection, instead of having to develop a query to execute the task. Only the records with that value for that field are shown

Filter by Exclusion

Only the records without that value for that field are shown

Advanced Filter Method

The original way of filtering from a form is now classified as an advanced filter. It does however have the advantages of being able to sort the results at the same time; is easier when setting more than one criteria, or complicated criteria and a familiar way of performing queries.

Only the records with that value for that field are shown

Queries

Design Grid

The design grid now shows tablename which saves confusion about which table a field is coming from

Simple Query Wizard

Similar to Form Wizard. Allows users to locate desired information. Users choose desired data from a drop-down box and the wizard handles the inclusion of related tables if necessary.

You can now sort your query results quickly by right clicking the field and selecting sort or using the toolbar sort buttons. This was previously only available for tables

Nz Function

This can be used as an alternative to the isnull function

Other new functions are: Array, Cbool, Cbyte, Cdate, ChrB, CVErr, FileDateTime, FileLen, GetAllSettings, GetAttr, GetSetting, GUIDFromString, HyperlinkPart, InputB, IsArray, IsError, IsMissing, IsObject, LeftB, LoadPicture, MidB, RightB, StringFromGUID, TypeName

Forms

Form and Report Wizards

The Form Wizard and Report Wizard have been improved to allow users greater flexibility in creating the exact view required, regardless of underlying tables or queries. After selecting the desired data for the form or report, users are presented with different layout choices based on the data selected. For example, if a user chooses data on both sides of a one-to-many relationship, the Form Wizard now offers to build a main form or subform. The main-subform wizard option has now vanished, and instead there is a bigger choice of autoforms and reports. 9 styles are now available. In practise I do not think many forms with clouds will be chosen!

On the Insert Menu: AutoForm will automatically create a form for the table or query selected in the Database window; AutoReport will automatically create a report for the table or query selected in the Database window.

Chart Wizard

There are now 20 chart styles (Access 2 has 12). New styles include cone bar charts, 3-D cylinder bar charts and bubble charts (variable sized bubbles). I found it a lot less intuitive to change the design of a graph. For example to add titles one had to go to Chart options and select options on the Data Labels and Titles tabs rather use Insert.

One can add a chart to a form by selecting Chart from the Insert menu. The graph icon is no longer on the toolbox.

New Navigation button

To the right of the navigation bar is an extra button identified by a star which can be pressed to create a new record

Drag and Drop

Lookup fields

In the interests of performance, data in a lookup field, list box or combo box that comes from another table does not automatically refresh when the other table is updated. You can refresh the data manually by pressing F9.

Form Properties

AllowFilters, AllowEdits, AllowAdditions, AllowDeletions are yes/no values and replace properties for Default Editing, Allow Editing, Allow Updating which each had various options. New data properties Filter, Order by have been added. New events properties Filter and ApplyFilter have been added.

Colour palette icon replaced with toolbar icons Fill/Back colour, Font/Fore colour, Line/border colour.

The SpecialEffect property now includes etched, shadowed or chiseled in addition to Nornal, Raised and Sunken.

Shortcut keys for data entry

Many more short cut keys are available for example CTRL+SEMICOLON to enter current date

Toolbox

Picture Backgrounds

One can add picture backgrounds to forms and reports

Cycled Properties

Double-clicking on property definitions in the Tabbed Property dialog box will cycle through the available options.

Changing Control Types

Can change control types on their forms and reports "on the fly" without rebuilding the control from scratch.

Can also specify the control type of a field in table design

Multiselect List Boxes

Native list-box controls can be selected either singly or multiply. When a user closes a main form that displays multiple instances of a second form, you may want the user to be able to choose instances of the second form to keep open. For example, when the CustomerPhoneList form closes, the CustomersDialog form displays a list box showing the customer records currently displayed in instances of the Customers form. The user can select one or more customer records to keep open. To view this form, open the Developer Solutions sample application (which will need to be converted!). In the opening form, click the entry in the upper list box that reads: Get more mileage from combo boxes, list boxes, subforms, and subreports. In the lower list box, click the entry that reads: Create a list box that allows you to select and manipulate multiple objects. The Customers Dialog form uses event procedures. You can copy these event procedures to your database and customize them to fit your needs. Problem is that it falls over with compilation errors because a utility add-in has not been added.

ControlTips

Can add own ControlTips to controls on forms to show the purpose of the control. When the user hovers the cursor over a control with a custom ControlTip defined, the text is displayed in a small text box beneath the control. Look at the help under controls, help tips.

Notes

Format Painter

Like other Office applications, Access has the Format Painter (brush icon) feature. The Format Painter is used on forms and reports to copy formatting from one control to others.

To copy formatting characteristics from one control to another:

Access copies any of the following properties: SpecialEffect, BorderStyle, BorderColor, BorderWidth, BackColor, BackStyle, LineSlant, Visible, DisplayWhen, FontName, FontSize, FontWeight, ForeColor, FontItalic, FontUnderline, LabelAlign, TextAlign, LabelX, and LabelY.

You can not copy properties to or from ActiveX Controls.

AutoFormat

The AutoFormat feature is used to choose from a list of approximately 30 predefined styles to format forms and reports, as with the AutoFormat feature in the other Microsoft Office applications. If users define a form or report style they like, the style can be saved as a custom style and applied to new or existing objects within the database.

Format a form, report, or control using predefined formats

Note

Calendar Control (example of an ActiveX control)

A 32-bit Calendar Control can be used to select dates quickly, without any code. The user simply drops this control onto a form for an easy way to select dates. Changes made to data using the calendar are then stored in the underlying table.

Custom Shortcut Menus

Developers and users can add their own right-click shortcut menus to controls on forms.

Access adds the shortcut menu to the Shortcut Menus toolbar, from which you customise all shortcut menus.

Page number and Date/Time controls

It is now easier to add controls to display page numbers and dates since location and format are asked for

You will probably have to change the page/ date control colour since it seems to take characteristics of the text fields rather than the header fields

Image Control

An image control provides a simple way to include graphical information on forms or reports and improves the display performance of the image. Previously, images were displayed using OLE, which included unnecessary steps. When you insert clip art, you can convert the image to drawing objects and then use options on the Drawing toolbar to edit the objects or example, to change the fill or line colours, rearrange parts, or combine images.

PivotTable Wizard

A pivottable is like a crosstab query but you can switch the row and column headings dynamically to see a different view of the data. This wizard walks through the creation of Excel PivotTables based on an Access table or query so that you can perform Excel analysis directly within Access. You must have Excel 95 or later installed. It can be very slow because it needs Excel and Access loaded at the same time and is far harder to edit and more restrictive than using the crosstab query wizard.

The table can only be edited in Excel

The PivotTable opens in a separate window with the Excel commands and toolbars displayed. Press ! to refresh the data. Only rows and columns can be swapped around since one can not edit summary data.

Macro Conversion

There is now an option to convert a forms macros to Visual Basic

Memo Fields

Memo fields automatically get a vertical scroll bar and EnterKeyBehaviour setting (this is used to specify what happens when you press ENTER in a text box control in Form view or Datasheet view). This makes entering multiple-line text easier. If you do not set this property to New Line In Field, you must press CTRL+ENTER to enter a new line in the text box.

Change Event

The Change event occurs when the contents of a text box or the text portion of a combo box changes on a form by typing the data directly. It also occurs when you move from one page to another page in a tab control. Setting the value of a control by using a macro or Visual Basic does not trigger this event for the control.

To run a macro or event procedure when this event occurs, set the OnChange property to the name of the macro or Event Procedure. You can coordinate data display among controls and display data or a formula in one control and the results in another control.

The Change event does not occur when a value changes in a calculated control or when you select an item from the combo box list.

BeforeInsert event occurs before the Change event, BeforeUpdate and AfterUpdate events for the text box or combo box control occur after you have entered the new or changed data in the control and moved to another control (or clicked Save Record on the Records menu), and therefore after all of the Change events for the control.

Triple State Check boxes, radio buttons

You can use the TripleState property to specify how a check box, toggle button, or option button will display Null values. It does not apply to the specified controls when they are used inside an option group control.

The TripleState property uses the following settings:

Yes The control will cycle through states for Yes, No, and Null values. The control appears dimmed (grayed) when its Value property is set to Null.

No (Default) The control will cycle through states for Yes and No values. Null values display as if they were No values.

Reports

Multipage Print Preview

Print Preview now supports the viewing of several pages at once. Users can decide how many pages they want to preview as well as how pages are organised on the screen in common with other Office applications.

Grouping Properties

Use the RepeatSection property to specify whether a group header is repeated on the next page or column when a group spans more than one page or column. The RepeatSection property only applies to group headers on a report.

Use the HasContinued property to determine if part of the current section begins on the previous page.

Use the WillContinue property to determine if the current section will continue on the following page.

Trapping reports with no data

Use the NoData event

Filter Reports

Filter the report to match the current filter in a form using the Filter and FilterOn properties

Print Icon

Prints immediately without confirmation/cancellation question

Mailing Label Wizard

Mailing Label wizard easier to use

Sharing Information in Access 97 on the Web

Access 97 has integrated hyperlinks throughout the application.

Adding and Deleting Hyperlinks

Access 97 supports the storage of hyperlinks as a native datatype. A hyperlink, when clicked, opens the linked Microsoft Office document at a specific location, or URL address, whether it is located on the World Wide Web, an intranet, corporate LAN, or local machine. Hyperlink targets enable you to jump to an Access97 database, or from within other Office documents such as a Word document or Excel spreadsheet.

Access 97 command buttons with hyperlink properties can now link to an external Web site. Supporting hyperlinks as a native datatype has further implications for databases created in Access 97 since they also allow connectivity between objects within an Access 97 database. Labels and images can serve as navigation controls to sources both inside and outside the database itself.

Access recognises hyperlink protocols and automatically translates the text into a valid address.

To test the link:

To add a static hyperlink field to a form:

To change the appearance of a hyperlink

To remove a hyperlink

Web Toolbar

The web toolbar contains buttons to go forward, backward, stop, refresh, go to the start page, search the web etc. Note that the favourites menu will look for url and lnk files in the Favorites/Personal folder unless directed to look at the bookmarks.htm file in the Netscape folder.

To make it easier to see more of the file you have just opened, click the Show Only Web Toolbar button, which hides the application's toolbars.

If the web toolbar is not visible:

Publish to the Web Wizard

The Publish to the Web Wizard is a flexible tool that allows users to publish any object in their database either statically or dynamically. It allows for custom HTML formatting using templates, and remembers all of the settings used to output the objects in the form of a configuration.

Users may choose to output some objects statically and some dynamically and choose a different template for every object in the database if they desire. A home page linking all the selected objects can be generated automatically. The Publish to the Web Wizard integrates with the Microsoft WebPost Wizard to automatically move the published objects to the Web server of choice

Static Data HTML Output

The output of static data from a database is extremely useful, especially when the information seldom changes. Users can share static views of their data via the Web, by:

or

Access outputs table, query, and form datasheets, and formatted reports directly to the HTML format. The formatting options employed are identical to those chosen for the object inside Access 97. Datasheet font colour, size, and face are maintained, along with datasheet cell background colour and sizing. If a report consists of more than one page it will create multiple pages of output connected by navigation hyperlinks, allowing the viewer to see the report on the Web as intended.

Hyperlinks stored in a database remain intact during the output process.

Dynamic Data Output to IDC/HTX

Users can also publish information from a dynamic datasource, so that web users receive the latest information by querying the database. Internet Database Connector (IDC) provides a way for users to share structured data in a workgroup, or via the Internet. HTX/IDC supports datasheets. ASP (Active Server page) supports datasheets and forms. Neither support reports. The database must reside on a Microsoft Internet server or Personal Web server.

Access creates the internet database connector query file(s) (*.idc) containing information about the view of data to publish, and the HTML extension template(s) (*.htx) which contains information about how to format the information being returned.

Parameterised Web Queries

Parameterised queries created in Access 97 can also be published. This type of query requires the user to specify the criteria that is used in selecting the appropriate set of records. Thus one can present a datasource that is not only dynamic, but also interactive.

Templates

The Publish to the Web Wizard employs the use of templates to achieve formatting. A template is an HTML document that contains formatting attributes, images, and other elements that are applied the document being output. The usage of a pre-designed template in preparing HTML output, allows a user to define what the output will look like in a WYSIWIG fashion and reuse that design for later use. This enables any data residing in an Access 97 database to easily be formatted.

When you output a datasheet, form, or report, or use the Publish to the Web Wizard, and you specify an HTML template file, Access merges the HTML template file with the output files by replacing template tokens

HTML template token Replacement
<!--AccessTemplate_Title--> The object name (placed in the title bar of the Web browser)
<!--AcessTemplate_Body--> The object output
<!--AccessTemplate_FirstPage--> An anchor tag to the first page
<!--AccessTemplate_PreviousPage--> An anchor tag to the previous page
<!--AccessTemplate_NextPage--> An anchor tag to the next page
<!--AccessTemplate_LastPage--> An anchor tag to the last document page
<!--AccessTemplate_PageNumber--> The current page number

HTML template file default:

<HTML>
<!--The following token places the object name in the title bar of the World Wide Web browser.-->
<TITLE><!--AccessTemplate_Title--></TITLE>
<!--The following HTML tag can be used to create a different background colour than the Web browser default.-->
<BODY BGCOLOR = "#FFFFFF">
<!--The following token places all object output inside the <BODY> tag.-->
<!--AccessTemplate_Body-->
</BODY>
<BR><BR>
<!--The following adds a small picture stating created by Access-->
<IMG SRC = "msaccess.jpg">
</HTML>

By default, Access looks for a template file in the \Program Files\Microsoft Office\Templates\Access folder. The default folder can be changed by entering a different folder in the HTML Template box located in the Hyperlinks/HTML tab of the Options dialog box.

HTML Importing, and Linking

The Import/Export Wizard can now import data from HTML tables in an HTML document directly into a new table, or append the records to an existing one.
If there are multiple HTML tables or lists in a single page, Access 97 recognises these and allows the user to select the appropriate one to import.

If the information residing in an HTML page changes quite regularly, Access 97 provides the user with the ability to attach to an HTML table on any Web page. This is a read-only link.

The attached file is shown with a symbol looking like a yellow page with a world in the middle in the table listing

Connecting Databases over the Internet

The installable drivers that allow for the linking of databases in formats other than Access have all been enhanced, thus now allowing for connectivity via the Internet. A user simply selects the appropriate ftp site from the linking dialog, and then chooses any compatible database object. The ability to connect databases across the Internet allows users easy access to the information they need, regardless of its location.

Other Features with Excel, Word

Retain Text Formatting

When you cut or copy data from Access forms and datasheets, the settings for font, alignment, and number formatting for headings and data are retained when pasted into Excel spreadsheets. Access supports Binary Interchange File Format (BIFF) used in Excel.

New Access features when using Excel

General Features

Database Properties

Can be used to locate databases with the Find File feature

Other new Access 97 Edit menu commands

Other new Access 97 View menu commands

Other new Insert menu commands

Other new Tools menu command

Find and Open Databases

There are several icons to show creation details, properties etc when opening a database. In theory if one sets keywords, subjects etc for the database property, one should be able to search for these words when trying to find a database but this did not seem to work very well. The search seems to be restricted to filenames and modification dates.

Linking Access to Excel

A new, updateable, ISAM driver allows users to create new tables in Access linked to Excel worksheets, allowing Access forms, reports and queries to work against native Excel data.

The linked spreadsheet now can be accessed in the same way as an Access table but the spreadsheet values will be changed if the data is changed from Access

Start-up Properties

Start-up properties that control how a database is opened, eliminate the need for Autoexec macros. Application icons, titles, startup form, menu and toolbar defaults, and system hot keys can be controlled.

Auto Conversion

In Access 97, upon opening a database created in an earlier version of Access, the user is prompted with the option to convert to the current format, or enable the database so that users running either Access 97 or an earlier Access version can still use the database.

Database Replication

Briefcase Replication is a convenient tool for keeping a database file up to date. Using the Briefcase method, you can drag a Microsoft Access database from a shared folder on the network which is converted to a Design Master, to My Briefcase on your own PC, and a replica is created in your Briefcase. Then when you reconnect the PC to the network, you can synchronize changes between your PC replica and the Design Master on the network. Both will receive changes to data from the other.

Briefcase Replication

Replication Menu Commands

Replication commands on the Tools menu allow you to create replicas (full or partial) and synchronize them as you work in Microsoft Access. Replication commands enable you to create a replica of the design master, recover design master, resolve conflicts and synchronize. If you are running Access97 from a network, you must make sure that you have your own version of system.mdw, and that the registry points to your copy (using regedit) else you get Microsoft can't start a Microsoft Jet database session. To convert a database to a Design Master and create a replica:

Partial Table Replication Programming

Partial replicas are replicas that contain only a subset of records in a full replica. To create a partial replica, you specify a filter that restricts the data that's synchronised to a subset of the full database. By using partial replicas, you can synchronise a replica with only the data that you need, rather than with an entire database. Access 97 now provides extensions for partial table replication via the Data Access Objects (DAO) which include methods and properties developers can use to programmatically replicate and synchronise databases.

Internet Replication

Using Internet Replication, changes to data in either the master or replica databases are transferred via ftp (file transfer protocol) to the appropriate location (client or server). The synchroniser will merge the appropriate database changes, ensuring that both databases have identical information. This allows users to keep their data up-to-date regardless of current location.

Enhanced Performance

Lightweight Objects

Access 97 now creates forms and reports that are "lightweight" (objects do not have a Visual Basic module behind them) by default. Thus, when opened, they will load faster than traditional objects containing code. However, the instant you add code to a form or report, it will become a traditional form or report object. A new property, called HasModule, has also been added to forms and reports, which toggles between a traditional or lightweight form.

Databases created using the Database Wizard in Access 97 create lightweight forms whenever possible. If code is required only for navigation purposes behind a command button, the Database Wizard will use a hyperlink as the means to launch that form instead of creating a new code module.

Remove Source Code (MDE files)

"Make *.MDE" allows developers to build and distribute more secure Access applications and improve performance. It strips the Visual Basic source code from an Access application and converts the file to a database with an *.MDE extension. The MDE database can be opened and used in Access, however users can not change the design or create new objects.

Performance Analyzer Wizard

The Performance Analyzer Wizard examines existing databases and recommends changes to improve application performance. It can automatically complete some performance enhancements; other enhancements are recommended or suggested by the wizard. It also offers a manual mode for more sophisticated users.

Demand Loading

Access now shares Visual Basic with other Office applications so it can load library code into memory only when needed.

Visual Basic for Applications

The Access 97 development environment now supports Visual Basic for Applications 5.0 as well as IntelliSense
features to make it easier for programmers to develop custom solutions.

New commands on Edit Menu and View menu

New commands on Debug Menu

Drag-and-drop code

Developing application code can be a time-consuming process so one tends to reuse as much code as is appropriate. Access 97 makes it easier to restructure and reorganise the code in procedures with the added ability to drag and drop code segments across procedures and modules.

Data Types

Boolean, Byte and Date have been added. Functions can now have arrays for parameters.

Colour-coded syntax

The integrated development environment within Access 97 supports colour-coded syntax to highlight items such as comments, commands and breakpoints in Visual Basic for Applications code. Users are able to set the font size, format and colour for viewing their codes.

Full module/procedure view

Users now have the ability to switch between Full Module view, and Individual Procedure view just by clicking the persistent button in the lower left-hand corner of the code window

Improved Watch window

The Watch window provides an enhanced debugging environment, including the ability to add watch points, and inspect any application variables at run-time, including all system variables. When you suspend execution of Visual Basic for Applications code, you can observe the values of watch expressions in the Watch pane of the Debug window by pressing the spectacle icon. You can also perform an instant watch to see the value of an expression that has not been specified as a watch expression.

QuickTips and drop-down menus

QuickTips and drop-down menus within the code window greatly simplify the process of writing code by allowing users to select from a list of valid Visual Basic commands as they write code.

QuickTips display the syntax for a function, method, or procedure based on cursor position.

Drop-down menus appear for properties and methods available for the object that precedes a period (.) and for constants which are valid for a property that precedes an equals sign (=).

Hierarchical Object Browser

Access 97 includes an Object Browser in Module design that allows developers to quickly explore an object hierarchy to find specific information. The browser differentiates between built-in properties, custom properties, methods, event handlers and user defined procedures. It indicates which members are globally accessible and which are not. The browser shows function return types, parameter names and types, and user defined types and constants. Since the object browser is a persistent window, users can continue editing, while using the Object browser as a reference tool. The Object Browser can also be used to insert precise object references into code without the developer having to re-enter them.

Class Modules (Scoping)

New Class Modules in Access 97 are modules that can contain the definition for a new object. When you create a new class instance, you create the new object. Any procedures defined in the module become the properties and methods of the object. This gives greater control of the application code and it is easier to create reusable components of code. Additionally because modules are objects with methods, properties and events developers have programmatic control over application code components. In Access 2 you can only call a procedure defined in a report or form from that object. In Access97 you can call a public procedure from in a report or form from any procedure in the database providing it is qualified by the class name of the form or report module. For example to call a procedure called test defined in the Student form, use the syntax Form_Student.test. It is better to place often used procedures in a standard module.

Multi-Instance Forms

In Visual Basic one can programmatically create multiple instances of the same form, which enables better branching within applications. Each form maintains its own underlying record set and can update data independent of other data. For example, a user can pull up several student forms simultaneously. The user can then move freely between forms and Access maintains the working environment correctly for each.

Conditional Compilation

Developers can set compilation flags within their codes to control the resulting application's behaviour. This enables developers to create debug and retail compilations of their applications simply by setting flags in their codes.

Source-Code Control

Access 97 supports integration with various source-code control providers, including Microsoft Visual Source Safe. This is available as an add-in in the Office Developers Edition. The add-in is compliant with the standard source-code control interface, thus any source-code control provider that supports the interface, including PVCS or Visual Source Safe, can now integrate with Access 97.

By integrating source-code control in Access, teams of developers can now work collectively on a single Access database application and maintain code integrity, for example by visually comparing differences between versions of an object.

OLE Automation Object and Controller

In order to automate common database tasks, Access 97 can drive or be driven from any application that supports OLE Automation, including Excel, Visual Basic and Microsoft Project. This means that developers will be able to take programmatic control of product functionality, such as the reporting engine, from outside of Access.

Menu changes from Access2 to Access 97

The following sections summarise the Access 2.0 commands that have changed location or functionality in Access 97.

File Menu

Access 2.0 commandChanged to this in Access 97

Compact Database (when no database open)

Moved to Tools/Database Utilities submenu

Convert Database (when no database open)

Moved to Tools/Database Utilities submenu

Encrypt/Decrypt Database (when no database open)

Moved to Tools/Security submenu

Repair Database (when no database open)

Moved to Tools/Database Utilities submenu

Toolbars (when no database is open)

Moved to View menu.

Unhide (when no database is open)

Moved to Window menu.

Run Macro (when no database is open)

Moved to Tools/Macro submenu

Add-ins (when no database is open)

Moved to Tools menu, available only when a database open.

Close Database

Renamed Close.

New submenu commands

Moved to Insert menu.

Rename

Moved to Edit menu.

Output To and Export

Consolidated in Save As/Export.

Import

Moved to Get External Data submenu.

Attach Table

Renamed Link Tables (Get External Data submenu).

Imp/Exp Setup

Removed. Click the Advanced button in the Import Text Wizard or Export Text Wizard to work with Import/Export specifications.

Print Setup

Renamed Page Setup.

Print Definition

Replaced by Documenter (Tools/Analyze submenu)

Save Layout (in the Relationships window)

Renamed Save.

Save As and Output To (in table and query Design view)

Consolidated in Save As/Export.

Save Table (in table Datasheet view)

Renamed Save.

Save Query (in query Datasheet view)

Renamed Save.

Save Form (in Form view and form Datasheet view)

Renamed Save.

Save Query As (in query Datasheet view)

Renamed Save As/Export.

Save Form As (in Form view and form Datasheet view)

Renamed Save As/Export.

Save Record (in Form and Datasheet view)

Moved to Records menu.

Save As Report (in form Design view)

Removed. Right-click a form in the Database window to save a form as a report.

Sample Preview (in report Design view)

Renamed Layout Preview (View menu).

Load Text (in the Module window)

Replaced by Import/Get External Data submenu

Save Text (in the Module window)

Renamed Save As Text.

Edit Menu

Access 2.0 commandChanged to this in Access 97

Relationships

Moved to Tools menu.

Insert Row (in table, query Design view)

Renamed Rows (Insert menu).

Set Primary Key (in table Design view)

Renamed Primary Key.

Undo All (in query Design view)

Removed.

Insert Column (in query Design view)

Renamed Column (Insert menu).

Undo Current Field (in table, query, form Datasheet view)

Renamed Undo Current Field/Record.

Insert Object (in table, query, form Datasheet view)

Renamed Object (Insert menu).

Links (in table, query, form Datasheet view)

Renamed OLE/DDE Links.

Tab Order (in form and report Design view)

Moved to View menu.

Find Previous (in the Module window)

Removed. Use Find to search backwards.

New Procedure (in the Module window)

Renamed Procedure (Insert menu).

View Menu

Access 2.0 commandChanged to this in Access 97

Tables

Moved to Database Objects submenu.

Queries

Moved to Database Objects submenu.

Forms

Moved to Database Objects submenu.

Reports

Moved to Database Objects submenu.

Macros

Moved to Database Objects submenu.

Modules

Moved to Database Objects submenu.

Table Properties (in table Design view)

Renamed Properties.

Palette (in form, report Design view)

Removed. Use the Formatting toolbar to perform palette functions.

Control Wizards (in form, report Design view)

Functionality moved to the Control Wizards button (Toolbox toolbar).

Split Window (in the Module window)

Renamed Split (Window menu).

Procedures (in the Module window)

Replaced by Object Browser.

Next Procedure (in the Module window)

Removed.

Previous Procedure (in the Module window)

Removed.

Immediate Window (in the Module window)

Renamed Debug Window.

Calls (in the Module window)

Renamed Call Stack.

Toolbars

Moved to the Toolbars submenu.

Tools Menu

The Tools menu is new in Access 97. It contains many commands that were on other menus in Access 2.0. New commands have been added to the Tools menu.

Access 2.0 commandChanged to this in Access 97

Security

Tools/Security

File/convert

Tools/Database Utilities/convert

File/repair

Tools/Database Utilities/repair

File/compact

Tools/Database Utilities/compact

File/add-ins/database Documentor

Tools/Analyze/Documentor

File/add-ins/attachment manager

Tools/Add-ins/Linked Table manager

File/output to

Tools/OfficeLinks

Edit/relationships

Tools/Relationships

Relationships Menu

Access 2.0 commandChanged to this in Access 97

Add Table

Renamed Show Table.

Remove Table

Replaced by Hide Table.

Create Relationship

Removed.

Query Menu

Access 2.0 commandChanged to this in Access 97

Add Table

Renamed Show Table.

Join Table

Removed.

Format Menu

Access 2.0 commandChanged to this in Access 97

Gridlines (in Datasheet view)

Removed. Use the Cells command to format gridlines.

Apply Default (in form Design view)

Replaced by AutoFormat.

Change Default

Renamed Set Control Defaults.

Page Header/Footer

Moved to View menu.

Form Header/Footer

Moved to View menu.

Records Menu

Access 2.0 commandChanged to this in Access 97

Go To

Moved to Edit menu.

Quick Sort

Renamed Sort.

Edit Filter/Sort

Renamed Filter.

Allow Editing

Removed.

Run Menu

(was Macro Menu in module Design view)
Access 2.0 commandChanged to this in Access 97

Compile Loaded Modules

Renamed Compile All Modules (Debug menu).

Continue

Renamed Go/Continue.

Step Into

Moved to Debug menu.

Step Over

Moved to Debug menu.

Set Next Statement

Moved to Debug menu.

Show Next Statement

Moved to Debug menu.

Toggle Breakpoint

Moved to Debug menu.

Clear All Breakpoints

Moved to Debug menu.

Modify Command$

Removed.

Window Menu

Access 2.0 commandChanged to this in Access 97

Tile

Replaced by Tile Horizontally and Tile Vertically.

Help Menu

Access 2.0 commandChanged to this in Access 97

Contents

Renamed Contents and Index.

Search and Cue Cards

Removed. Use Access Help to display the Office Assistant and view Help.

Technical Support

Functionality moved to Tech Support button in the About Access dialog box.

Other Conversion Problems

Converted Toolbars Lose Button Images

After you convert a database in Access 97, some custom toolbar buttons may appear blank because there is no equivalent image in the new version. The Exit door is one example of an image that has changed. You can replace the missing image with one that is available in Access 97, or use an icon editor to recreate the old button image to use in your database.

On a form, command button images do not change because they are stored in the Picture property of the control.

Access Intrinsic Constants

Intrinsic constants in Access 97 are a mix of lowercase and uppercase letters, and parts of the constant are concatenated rather than separated by underscore characters. For example, the constant A_NORMAL in Access 2.0 is acNormal in Access 97.

Intrinsic constants in databases created with earlier versions of Access will not automatically be converted to the new constant format, but old constants will continue to work without errors. However, it is recommended that you use the new format whenever you write new code.

DoCmd Statement

The DoCmd statement in Access 2.0 becomes the DoCmd object in Access 97, which requires slightly different syntax. The following Access Basic code in Access 2.0

DoCmd OpenForm "MyForm"


becomes the following Visual Basic method of the DoCmd object in Access 97:

DoCmd.OpenForm "MyForm"

In some cases, Access 97 may fail to convert Access 2.0 DoCmd<space>Action to the proper DoCmd<dot>Method syntax used in Access 97. When that happens, you receive code compilation error messages in the converted database, which are easily corrected by removing the space and adding the dot (.) in the DoCmd portion of your code.

Note DoCmd DoMenuItem actions in code are not automatically converted to the Access 97 RunCommand syntax, but the DoMenuItem syntax works correctly in Access 97.

However, DoMenuItem macro actions are automatically converted to their equivalent RunCommand actions when you open a macro in Design view. A few DoMenuItem macro actions do not have equivalent RunCommand actions in Access 97. Those actions are documented in Access 97 Help.

SendKeys Statement and Macro Action

Because some menu items and the structure of the menu tree is different in Access than in earlier versions, your SendKeys statements in code or SendKeys actions in a macro may fail or may not produce the desired action. Locate the new menu items in Access 97 and modify your SendKeys code or macros to send the correct keys. New features in Access 97 may make some of your old SendKeys actions obsolete or unnecessary.

ObjectName.FieldName Legacy Syntax

If you convert an Access 2.0 database that uses ObjectName.FieldName data access objects (DAO) syntax in Access Basic, the database converts properly. However, in order to maintain backward compatibility with your DAO syntax, the converted database contains a reference to the Microsoft DAO 2.5/3.5 Compatibility Library instead of the new Microsoft DAO 3.5 Object Library.

For example, the following code is acceptable in Access 2.0:
Set rs = db.OpenRecordset("Customers")
Debug.Print rs.[Customer ID]

The same code in Access 97 requires an exclamation point (!) in front of the [Customer ID] field:
Set rs = db.OpenRecordset("Customers")
Debug.Print rs![CustomerID]

If you change the reference in your database from Microsoft DAO 2.5/3.5 Compatibility Library to the Microsoft DAO 3.5 Object Library, you must also update any ObjectName.FieldName syntax to ObjectName!FieldName syntax in your code or compilation errors will occur.

New Error Codes in Access 97

Some error codes have changed in Access 97, and this may have an impact on a converted database that uses extensive error trapping. For example, when you reference the PaletteSource property of a text box that does not exist, Access 7.0 returns the error message

2455 Application-defined or object-defined error

whereas Access 97 returns the error message:

438 Object does not support this property or method.

Also, certain actions in Access 2.0 code do not generate a run-time error, but they do in Access 97. For example, if your code sets the value of a form control’s Tag property to Null, no error occurs in Access 2.0, but Access 97 generates the following error message because of more stringent control property type checking:

Run-time error 13 Type Mismatch

This issue is documented in the Acreadme80.wri file in your Access 97 program folder.

Code with Line-Continuation Characters

In rare cases, Access 2.0 Basic code that uses an underline (_) as a line-continuation character may not compile properly after it is converted due to changes in the module window line-continuation algorithm in Access 97. The error is easily corrected by removing or relocating the line-continuation character in your code.

Macro-Defined System Menus

In Access 2.0, all user-defined menus are created using macros to define the menu bars and menu items. Menu Builder is used to create custom menus and shortcut menus which generates a macro group using AddMenu and DoMenuItem actions. In Access 97, menu bars, toolbars, and shortcut menus are all part of the CommandBars collection of objects in Visual Basic for Applications.

When you convert a database that contains macro-defined custom menus, the menus work as they did before, but the conversion process does not automatically convert your macro-defined menus to the CommandBar object model. To convert a macro to a command bar after you convert your database, select the macro in the Database window, and then click Macro on the Tools menu. Then click Create Menu from Macro, Create Toolbar from Macro, or Create Shortcut Menu from Macro. Unlike new menus, these menus depend on the macro group from access 2. If this macro group is deleted or any of the macros it refers to, the menu no longer works. Alternatively use the Customise dialogue box from the Toolbars submenu of the View menu.

Converting Add-In Databases

When an Access 2.0 Add-In database is converted to Access 97, and then you attempt to activate the add-in using the Add-In Manager, you may receive the following error message:

The add-in could not be installed because it is missing a USysRegInfo table.

For information about creating a USysRegInfo table, see Chapter 17, "Creating Wizards, Builders, and Menu Add-ins," in the "Building Applications with Access 97" user guide, or see article Q153858 in the Microsoft Knowledge Base.

dbFailOnError Behaviour in Access 97

Using DB_FAILONERROR with the Execute method of a QueryDef object automatically places an action query inside a transaction. This causes the entire operation to rollback if any errors occur during the processing of the query.

In Access 97, the dbFailOnError option does not automatically place the action query in a transaction, so all changes up to the failed record will not rollback automatically if the query fails. You must review all code that uses the Execute method with the dbFailOnError option in Access 97, and use explicit transactions if necessary.

Previously, if you executed SQL statements they were internally treated as transactions. If the flag was on and the query failed, the operation was rolled back. For performance reasons, an SQL statement is no longer treated as a transaction, so an incomplete transaction may occur. Use the SQL statement within a transaction by using the BeginTrans and CommitTrans method

Missing Resource

Compile Error: Can't find project or library

Caused by code drawing on a resource that was present on the build machine, but not on the target.

The standard library supplied with a different releases of Office vary and so affects the list of resources available to that machine.

To check if you have a similar problem:

If a resource is listed that is not available on the target machines where your database does not work, you have found the problem. To cure it, EITHER rebuild the database using more widely available resources OR install the needed resources on your target machines.

16-Bit ODBC Data Sources

If a table in your Access 1.x or 2.0 database uses a 16-bit driver to link to an ODBC data source, you may receive the following error message when you open the table, or when you open a form or report based on that table:

ODBC - connection to <DataSourceName> failed

To resolve this error, create an identically named data source using a 32-bit version of the ODBC driver.

Write conflict error If Access is attached to an Oracle database, and the user has entered non-ascii characters such as
¼, ½, ¾ having used Access 2 to enter the data then a totally misleading error message occurs stating that another user is trying to change the record when one tries to change it in any way. The solution is to correct the data using Oracle tools.

Exporting Tables with numerical names to ODBC source

Tables with name having a numerical character as first character will have that character replaced by an underscore

Convert Code That Calls a DLL

If your existing Access Basic code made calls to a 16-bit Windows application programming interface (API), you will need to modify these calls when you convert your database to Access 97 which is a 32 bit application. The following list provides some tips for converting your code.

The Windows API consists of a set of dynamic-link libraries (DLLs) containing system-related procedures that include functions, messages, data structures, data types, and statements you can use in creating applications that run under Windows 95 or the Windows NT platform. In order to call these procedures from Visual Basic, you must first declare them by using a Declare statement. You can then call them as you would any other procedure.

· Check any Declare statements to ensure that they refer to the correct DLLs. The following table shows the new names for the 32-bit Windows DLLs.

16-bit Windows DLL

32-bit Windows DLL

User.dll

User32.dll

Kernel.dll

Kernel32.dll

GDI.dll

GDI32.dll

If you can not obtain a 32-bit version of a DLL, then you'll need an intermediary DLL that can convert 32-bit calls to 16-bit calls.