DatabaseLessons.com

'Serving the Microsoft® Access
Community since 1997'

News/Blog
Tables
Queries
Forms
Reports
Modules
Miscellaneous
Subscribe
Free Samples
Videos
Services
Links
About Us

 

 

Creating MS Access Snapshot Reports

Have you ever used MS Access Snapshot Reports? Why would you?

Let's say you need to send a report to someone who does not have Access on their computer. I propose 3 methods to my clients.

  1. export the data to Excel, and pretty it up, or,
  2. obtain a print driver that can create PDFs, or,
  3. create a snapshot report

To create the snapshot version, once you have a report on the screen with the data you wanted, follow these steps (in Access 2000):

  • in the File menu, choose Export
  • change the "Save as type" to "Snapshot format (*.snp)"
  • type in a file name
  • turn off the "Autostart" feature (unless you want to automatically open the new snapshot file immediately for double checking)
  • click save

You can now email the .snp file to the intended recipinet.

(article continues below sponsor spots)

(article continues after sponsor spot)



If you will be creating the same MS Access Snapshot Reports regularly, consider creating the report snapshot using some VBA code.

'-----------------------------------------------------
DoCmd.OutPutTo acOutputReport,"name of the access report", _
acFormatSNP, "name of the snapshot file", True
-----------------------------------------------------

The name of the access report refers to a saved, tested, report design. The name of the snapshot file must include path information, and the extension should be .snp. Leave the name out (just 2 commas in a row) and you will be prompted for the file name. Just remember to put the .snp extension on when prompted. The "True" will fire up the snapshot viewer afterwards, so you can be sure all worked properly. Change the True to False and it will not fire up the viewer.

Which brings us to the snapshot viewer. On my machine's installation of Access 2000, the snapshot viewer was automatically put onto my system. If yours did not, and of course for your intended recipients who do not even have Access, you can download the viewer from the Microsoft site. Click here.

The above web page also has documentation, including two great examples of how you can use the MS Access Snapshot Reports capability in real life applications.

NOTE: All the VBA code segments on the Database Lessons site assume that you have DAO references active. If you are not sure what this means, and you are using Microsoft Access 2000 or higher, click here.

Happy Coding

 
Note: This web site dedicated to MS Access database users is an independent publication of Richard W. Killey and is not affiliated with, nor has it been authorized, sponsored, or otherwise approved by Microsoft® Corporation.
 

 

© 2006, 2007, 2008 Richard W. Killey. All Rights Reserved. - Privacy Policy