2001 February  apang@klohn.com  Pubic Domain software  Freely Distributable

AccessViewer allows Microsoft Access tables to be viewed individually through Microsoft Excel.  AccessViewer uses the ODBC Manager to retrieve data from a Microsoft Access file & display it in Microsoft Excel.
Microsoft Access does not need to be installed.


Requirements:
- Windows 95, 98, or NT
- Microsoft Excel 97 or 2000 
(AccessViewer assumes that Excel is installed in the default installation location, c:\program files\microsoft office\office\excel.exe -- but this can be modified, see the More Information section below)



Installation Instructions
- copy the AccessViewer directory to the local computer's hard drive & make a shortcut on the desktop to AccessViewer.exe



Operational Instructions
- before starting, a Data Source Name or DSN needs to be defined in the ODBC Manager, specifying the target Microsoft Access file:

1) in Control Panel, open the ODBC applet, usually named "ODBC Data Sources" or "32-bit ODBC" or something similar;  
if the applet is not there, it needs to be installed:
- close the Control Panel
- goto www.microsoft.com/downloads
- under Products, select ODBC 3.0 or higher
- select your Operating System, etc . . .
- select, download, & unpack the latest "ODBC Administrator & Driver Manager" version
- copy the unpacked files to C:\windows\system or C:\WinNT\system32
- go back to step 1

2) choose the "System DSN" Button or Tab
3) click the "Add" button to add a new system DSN
4) select the "Microsoft Access (*.mdb)" driver & click OK or FINISH;
if there is no Microsoft Access driver, it will need to be installed:
- for Excel 97, the driver can be obtained from the Office97 CD in several ways: i) running the Office97 setup, choosing the "Add/Remove" option, & selecting Data Access -> Database Drivers -> Microsoft Access Driver; or ii) from the Office 97 CD, run \Valupack\Dataacc\Dataacc.exe (select Data Access Drivers -> Microsoft Access Driver)
- for Excel 2000, the driver can be obtained by downloading & installing the latest Microsoft Data Access Components (MDAC) file, which can be obtained from www.microsoft.com/downloads (search for Data Access Components) or www.microsoft.com/odbc

5) beside the entry box labelled "Data Source Name", type in "AccessViewerDSN" without the quotes (this is the DSN which the AccessViewer program will use)
6) hit the "Select" button & choose the target Microsoft Access file that we want to work on
7) click OK, & click OK again 
8) to work on subsequent files, just redefine the target Microsoft Access file (ie. hit the "Setup" or "Configure" button & choose another Microsoft Access file to work on)
8) click OK & run AccessViewer
9) select the database table you want to view and click the "select a database table & then click here" button
10) while the database table is being retrieved, operational information can be viewed in the DOS status window
11) Excel will open & we can sort/format the data as desired
12) closing Excel returns control back to the AccessViewer program



More Information
- Excel is called from a batch file (runexcel.bat); the batch file can be modified to call Excel from any location; using a batch file assures that AccessViewer's program execution does not continue until the batch file has finished; this prevents the temporary output file from being modified while Excel is being opened; /r opens files as Read-Only & /e omits the Excel splash screen
- a minimized DOS status window is available to verify the program's execution
- after selecting a Table for viewing, AccessViewer retrieves the Table via Microsoft's ODBC Driver Manager using the defined system DSN; AccessViewer then writes the retrieved data to a temporary file (odbc.out) & then calls Excel to open the temporary file
- retrieved information is Case-Aware


Quirks & Minor Annoyances
- sometimes Microsoft Access will auto-format entry data so that it conforms to the database table or column format; AccessViewer will display the actual data (eg. if a date is entered incorrectly, Microsoft Access will try to auto-format the date to within a reasonable range; when viewed with AccessViewer, dates will appear properly, but if a date had been entered incorrectly, AccessViewer will not auto-format it)
- repeated & profuse clicking of the "select a database table & then click here" button, while AccessViewer is retrieving information could result in the clicks being buffered; once AccessViewer is finished retrieving information & calls Excel to open the temporary file, some of the buffered commands may execute
