In my effort to extract the portions of my program that prints the report, and then running the extracted database, I discovered a solution to my problem. In my codes, there is a command bar in the menu that print the active report using the code :


By default it prints all the pages in the report. I changed it to print only one page:

DoCmd.PrintOut acPages, 1

Now my program prints only a single page of the report. But I am still puzzled why DoCmd.PrintOut print out three pages of the same report. The error could be in my query or reports.

I send the extracted database over (Print3.mdb) with some data in the table in case you need it. Sorry that most of the user's codes are in the native language. The report is about statistics of students of different ethnicity in different classes and of different years of studies.