Results 1 to 5 of 5
  1. #1
    cvolkers is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Sep 2010
    Location
    South Dakota
    Posts
    9

    print a specific report


    Looking for the easiest way to do this. When I am looking at a specific record in my form view. Then I click the report button. I would like to have the report (certain data in this report) print to the printer. I just want to have that specific record print, not all the records.

    Any help would be great.

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    have you ever used the filter property in a report? it's exactly like a where clause in a query statement. when you open your report, what you could possibly do is write something to the effect of:
    Code:
    with me
       .filter = "[recordID] = " & forms("form with the button").controls("recordID")
       .filteron = true
    end with
    you would still have to print the report manually though. to print it automatically, I believe you have to set the default view to NORMAL instead of PREVIEW.

  3. #3
    Join Date
    May 2010
    Posts
    339

  4. #4
    cvolkers is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Sep 2010
    Location
    South Dakota
    Posts
    9
    Thanks all, that did the trick. Now the next question would be. In another program I have a form with a subform in it. I have created a report button for this, but it asks me what the record id for the main form and then the subform id. This gets the correct data from the correct forms.

    I used this to do what I needed

    If Me.Dirty Then 'Save any edits.
    Me.Dirty = False
    End If
    If Me.NewRecord Then 'Check there is a record to print
    MsgBox "Select a record to print"
    Else
    strWhere = "[ID] = " & Me.[ID]
    DoCmd.OpenReport "Special Order Line 1", acViewPreview, , strWhere
    End If

    I can see that I need to learn a lot more on VB. But is there a way to add to this above for what i am trying to do?

    Thanks again.

  5. #5
    cvolkers is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Sep 2010
    Location
    South Dakota
    Posts
    9
    Also I Have a field in one of my forms that has the option "Open" and "Closed" I use to konw how to do this, but now I can't for the life of me remember. I want that field to list Open when I click on a new record. Then when I open this specific form, I would like only the open records to be available.

    Thanks.

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

Similar Threads

  1. Can't see sub report in print preview
    By LoggyDoggy in forum Access
    Replies: 1
    Last Post: 04-20-2010, 05:38 PM
  2. Print a specific record report from a form
    By cynthiacorley in forum Reports
    Replies: 27
    Last Post: 02-08-2010, 06:34 AM
  3. Replies: 3
    Last Post: 01-14-2010, 08:32 AM
  4. Print Report from Form ID
    By Brian62 in forum Forms
    Replies: 1
    Last Post: 09-18-2009, 01:50 PM
  5. Replies: 3
    Last Post: 03-24-2006, 08:40 AM

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