Results 1 to 2 of 2
  1. #1
    pnasz is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Mar 2012
    Posts
    2

    Exclamation password before printing reports

    is there way to print the report in access 2003 after entering password.



    thanx in advance

  2. #2
    R_Badger is offline Knows a few tricks
    Windows XP Access 2003
    Join Date
    Feb 2012
    Location
    Suffolk, UK
    Posts
    262
    You can, however it requires using a form, and a little vb.

    First create your password textbox, on the data tab of the properties window, type password in the input mask. I shall refer to this as txt_pw.

    I shall refer to the report you want as rpt_protect
    Then create a command button on the same form, then right click-> build event-> code builder

    The vb editor should open and you should get something like
    Code:
    Option Compare Database
    
    Private Sub Command0_Click()
    
    End Sub
    Ignore the top line saying Option Compare Database
    you want it to read something along the lines of:

    Code:
    Private Sub Command0_Click()
    if [txt_pw]="Password" then
    docmd.openreport "rpt_protect"
    endif
    End Sub
    If you want to print preview it instead of directly printing, then use
    Code:
    Private Sub Command0_Click()
    if [txt_pw]="Password" then
    docmd.openreport "rpt_protect", acviewpreview
    endif
    End Sub

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

Similar Threads

  1. Printing Reports & Send to PDF
    By Dnphm in forum Reports
    Replies: 4
    Last Post: 02-13-2018, 07:25 PM
  2. Printing reports in batches
    By mnsemple83 in forum Access
    Replies: 6
    Last Post: 08-16-2011, 03:41 PM
  3. Printing reports off a list box
    By kbandong1 in forum Reports
    Replies: 3
    Last Post: 03-05-2011, 09:51 PM
  4. Printing multiple reports with one command
    By AKQTS in forum Reports
    Replies: 2
    Last Post: 09-24-2010, 09:32 AM
  5. Printing Reports....
    By Danny Christie in forum Reports
    Replies: 1
    Last Post: 12-06-2006, 05:51 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