?
Solved

Open report for a sepicific record.

Posted on 2012-03-27
2
Medium Priority
?
582 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
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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

809 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