Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report/Subform Query Frustration

Status
Not open for further replies.

roaml

Technical User
Feb 19, 2002
264
US
Hello,

I have a report that has a subform.
I would like to select a site manger from a combo list and open a report for the selected manager.
I have this working with a macro fine, but I would like for the report to open with one record only.

I am trying to create a generic report that opens with the selected site manager (from combo list).
When the report opens, it will have the selected site manager displayed in the site manager field.
The body of the report will include some generic instructions then list the data from the subform as created in the link master and child fields.
So far I am able to perform all of the above except the report opens with ALL of the records associated with the selected site manager.
I am trying to get the report to open with just one page, as if I was working in a Word document.
Can someone please give me some ideas on how to achieve this report problem?

Thanks a bunch!!
 
Roaml,

I'm not sure if I know what you mean but you could set the subform default view to "single form", this way it will display one record at a time.

Matt
:)
 
No, I need the subform to display all the records associated with the site manager. It is the Master report that I am having the problem with. I would like the master report to open with just one page or record, not all 10 pages.

Any ideas?
 
roaml,
So just open the report with a Conditional Expression...
Code:
    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "myReport"
    stLinkCriteria = "[myField]=" & Me.myField

    DoCmd.OpenReport stDocName, acViewPreview, , stLinkCriteria
Me.myField is a field in your form. [myField] is the same field in your report.
Good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top