?
Solved

Open report for a sepicific record.

Posted on 2012-03-27
2
Medium Priority
?
573 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 1400 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 600 total points
ID: 37773880
Docmd.openreport "reportname", acviewpreview,,"id=" & me.txtId


TxtId is a textbox containing the desired id
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
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…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Suggested Courses

777 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