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

Report Printing a Zillion pages, but only 1 page of data. 1

Status
Not open for further replies.

CptCrusty1

Programmer
Feb 17, 2005
216
US
I have a report that is only 1 page. If I press print, the page count goes up in the the thousands!!! To try and figure out what is going on, I ran the report to have it come up in Print Preview mode. I hit pg down, or next page, or what ever, and I see a new version of the report. The data is essentially the same though. One other interesting thing. I have a text box which shows the time and date the report was ran for records-keeping purposes. Every time I go to a new page, the time changes. The Report is essentially launched through VBA, however, I can also run it by dbl clicking on the icon for it. Same result. Is there some obscure formatting option I've forgotten/omitted/changed [ponder] ??

Thanks.
Richard.
 
Have you opened the report's record source query in datasheet view to see how many records are present?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
the record source for the form is not set. I have several Listboxes setup with their record sources being queries that return 1 column with one record. I.e., Listbox1 record source is something like SELECT count(widgets) from tblWidget) which will return 10, or something like that. This populates the listbox. Their are about 10 other list boxes (soon to be 20) all doing the same thing. The queries are essentially counting different Columns of the same table. I basicly just copied the query a bunch of times changing the column to count each time. My master table consists of about 10000 records. I'm thinking it wants to print one page for each record in the table.... any ideas?

RK
 
Why do you suggest "the record source for the form is not set"? Aren't we concerned with a report?

I have no idea what you are trying to do with your list boxes. Are you using them to filter a report?

"I basicly just copied the query a bunch of times changing the column to count each time" doesn't sound very efficient. We could possibly provide a better solution if we knew what you were attempting to do.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
I'm using "form" and "report" interchangeably.. sorry. Its a report. The first query creates a table with a list of services by date and type, as well as other things. Their are 10 basic services, we'll just call them Service01, through SErvice10. Essentially, I'm using listboxes since I can define the contents from a source other than what the report is set to (which I didn't set). I'm finding that my control source in a text box, or list box, or anything else for that matter is only going to come from the record source I define for the Report. Instead of doing that, I leave the list box control source blank, then use the row source property to populate the list box. I have queries written which provide me a one field, one record return, i.e. a number like 10, or 3000, etc. There are several such queries providing a total count on the various services.

If you can think of a better way to ride this pony, I'm open to suggestions.

Thanks.
Richard.
 
I don't understand why you are using list boxes on reports. If you want to display the count of the number of records in a table or query, you can:
- DCount("*","YourTableQueryName")
- Use a subreport bound to a totals query
- Use code

ALso, do you have fields with names like Service01, Service02,...? If so, do you understand that this is very un-normalized?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Dhookum,

The table structure was already in place when I came onboard. The Services are called Attr1, Attr2, Attr3, and are created by a Service ID which is kind of like a part number. The part number is broken down into its resective pieces (1,2,3), and then, since alot of spaces somehow got into the fields, I had to concatinate the fields back into their complete part number. Also, the individual Parts of the "part numbers" are what is being counted.

I was having trouble getting a Textbox to populate with the data I wanted via a report. I was using the build function, however, it would always give me an error. After several hours of wasted time and much frustration, I decided to try "anything" that would help me track my problem. The listbox seemed to work where the text box did not. Again, it is not feasable for me to change the format of the Client's data, I can only manipulate what they give me. I will try the Dcount. I didn't even think about that.

Thanks again.
Rich.
 
I am at a loss as to what your specifications for your report are. We don't really know what your tables and fields look like or your data. We also don't know how your data relates to what you want to show on your report.

All we know is that your current solution isn't working and you have a number of list boxes on your report.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
I figured it out guys. The problem was that I had the report's Control source set to the table I was looking at. It has 20000 records in it. The report wanted to make a page for every record. I removed the control source from the report (since I was using formulas for the textboxes) and that solved the problem.

Thanks for all the help
RK
 
I'm confused since earlier you stated "the record source for the form is not set". Now you state the report's Control Source (a report doesn't have a control source) has 20000 records in it.

I'm glad you found your issue but my first reply should have pointed out your problem.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
It did. I was suffering from temporary gaseous overload (brain fart). I missunderstood your perfectly logical explanation and then realized later what the issues were.

Thanks again.
Rich.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top