Solved

Open report for a sepicific record.

Posted on 2012-03-27
2
569 Views
Last Modified: 2012-03-27
Hi, I am using access 2010 vba on access 2010 database.

I need to open a report only for a specific record.

Thanks in advance.
0
Comment
Question by:baabaa_nl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 350 total points
ID: 37773872
use a where clause to filter the report

place this in the click event of a command button in a form

private sub cdmOpenreport_click()

docmd.openreport "reportName", acviewpreview,, [RecordID]=" & me.RecordID

end sub


me.RecordID is the control in the form that gets the recor id selected



post the codes that you are using
0
 
LVL 61

Assisted Solution

by:mbizup
mbizup earned 150 total points
ID: 37773880
Docmd.openreport "reportname", acviewpreview,,"id=" & me.txtId


TxtId is a textbox containing the desired id
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question