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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SubReport Only Displays on Page

Status
Not open for further replies.

swicklund

Technical User
Apr 26, 2005
10
0
0
US
I have a report that is generated based on critera I enter in a form. There is a subreport within the report, and no matter how many records that should be in the subreport, it only pulls up enough to fill one page.

See code below for opening report:

Dim stDocName As String
Dim Criteria As String
Dim tempString As String

stDocName = "ProjectsRpt"
tempString = Me!ProjectName
Criteria = "[ProjectName] = '" & tempString & "'"
DoCmd.Close

DoCmd.OpenReport stDocName, acPreview, , Criteria

I ran a quick query to verify the number of records based on my criteria, and got the 23 records I was expecting.

Any ideas??
 
swicklund
Try removing the DoCmd.Close command line.

What is happening, I suspect, is that the form is closing before the report gets a chance to pull the second page of records.

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top