I have a report (MatchesYPRep).It is based upon a query (YPMatchQAllMatches).
I have a form (OrgReportF) that gives the details of an organization.
It is based upon a table (OrganizationsT).
The report (MatchesYPRep) has a button (ButtonPrintOrgForm) beside each entry. The button opens OrgReportF. The button is placed next to the OrgName field on the report.
When the user presses the button, I want it to display the OrgReportF only for the record the button accompanies.
So, for example, MatchesYPRep report looks like this:
Kim Martin (Note: the report is grouped by a person associated with each org)
AISEC [Print Org Report]
Humane Society [Print Org Report]
What I'm getting is an "Enter Parameter Value" box asking for YPMatchQAllMatches!OrgName.
The macro behind the button is currently as follows:
OpenForm
Form Name: OrgReportF
View: Form
Filter name: [Blank]
Where Condition = [OrganizationsT]![OrgName]=[YPMatchQAllMatches]![OrgName]
If I I delete the text above in red, so the condition is [OrganizationsT]![OrgName]=[OrgName], I get a Ryn0tie error '2105' - "You can't go to the specified record." The debugging shows that it wants to go to a new record: DoCmd.GoToRecord , , acNewRec.
Maybe something needs to go in the filter, but I didn't have any clue of what to put there.
Any thoughts?
Thanks so much!
--ak