Results 1 to 6 of 6
  1. #1
    Kagbodo is offline Novice
    Windows Vista Access 2010 64bit
    Join Date
    Jul 2011
    Posts
    3

    Automate Printing Report

    I would like to set up a macro in access that will locate a file, run a query on the file, and print out the result. I would like to link all these works to a key on the keypad so that when I hit on that key everything executes from the begining to printing. This will be used to print out lists of employees who are present in a facility during an emergency evacuation. Thanks for helping me!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    What do you mean by 'locate a file' - a table in Access? Build a report based on this table. Print report.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Kagbodo is offline Novice
    Windows Vista Access 2010 64bit
    Join Date
    Jul 2011
    Posts
    3
    Yes, a table in Access. Actually the data will be saved as filename.dbf. This file is readable in Access.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    So it is NOT an Access table but a dbf table. Link to the dbf file then treat it like Access table.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Kagbodo is offline Novice
    Windows Vista Access 2010 64bit
    Join Date
    Jul 2011
    Posts
    3
    Ok, that's right. So is it possible to create the automation?

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Report would have RecordSource of the linked dbf table.

    Command button on form, in Click event use code (macro or VBA) to execute OpenReport method. I use only VBA:
    Private Sub buttonname_Click()
    DoCmd.OpenReport "reportname"
    End Sub
    Other arguments besides the report name can be passed in this command, such as filter criteria.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 05-25-2011, 06:13 AM
  2. Report printing
    By Andrevw in forum Reports
    Replies: 1
    Last Post: 01-16-2011, 06:08 PM
  3. Report Printing
    By newtoAccess in forum Reports
    Replies: 5
    Last Post: 12-02-2009, 07:46 PM
  4. Report Printing Error
    By gjohnson71 in forum Reports
    Replies: 4
    Last Post: 03-07-2009, 12:36 PM
  5. How to automate printing and saving reports
    By lilynet in forum Programming
    Replies: 0
    Last Post: 02-10-2009, 01:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums