tags:

views:

17

answers:

2

In Access 2007 I want to be able to click on a name field in a report and call a separate report with personal information about the person who's name was clicked to start the event. This would be as an alternative to creating a subreport or including the subreport fields in the main report in the interest of saving space. How do I reference the value of the clicked field for use in a query called with the OnClick event?

Thanks for your help.

A: 

You are kind of blurring the lines between a report and a form there. Could you not change your first report to a form (maybe a continuous one?) and then fire the sub report from that?

If you do want to still go with the report then it might be possible. At a guess it would involve returning the X/Y of where the mouse is and then mapping that to each control to work out which one has been clicked. Have a poke around Steve’s site as I’m sure I have seen him use something like that for a different purpose

http://www.lebans.com/

Kevin Ross
A: 

Use a form and have code behind the field to open a subform with data limited to that field. You may not get all the functionality of a report.

You could prompt the user when the report opens to give them an option to see details. They could select a specific record with an input box to show the details. This would require the user to rerun the report after looking at it in summary mode.

If you could output the report to an html file, you could create hyper-links to additional information.

Jeff O