how to print separate pages in a form, such as page 1 and page 4

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I use DoCmd.PrintOut, I can print a single page, a range of page but not
separate pages.

The error message is "There isn't enough memory to perform this operation.
Close unneeded programs and try operation again."

My code is as follows:
 
Why are you setting Application.Printer to Null?

See what happens with just

DoCmd.PrintOut acPages, 1, 1
DoCmd.PrintOut acPages, 4, 4
 
Dear Mr. Douglas J. Steele:

Thank you very much for response!

Actually, my first version was the same as you mentioned.

----------------------
DoCmd.PrintOut acPages, 1, 1
DoCmd.PrintOut acPages, 4, 4
----------------------

Which a error pop-up with 'There isn't enough memory to perform this
operation. Close unneeded programs and try operation again.' , so I added the
line 'Set Applicatin.Printer = Nothing', and same error message show up again.

By the way, I am using 'Access 2003'.

Hope to get your help! & Thank you again!


Regards,
Frank

Douglas J. Steele said:
Why are you setting Application.Printer to Null?

See what happens with just

DoCmd.PrintOut acPages, 1, 1
DoCmd.PrintOut acPages, 4, 4
 
In an attempt to see whether it's really memory-related, try changing the
PrintQuality parameter of the PrintOut method to something lower than the
default acHigh.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


frank said:
Dear Mr. Douglas J. Steele:

Thank you very much for response!

Actually, my first version was the same as you mentioned.

----------------------
DoCmd.PrintOut acPages, 1, 1
DoCmd.PrintOut acPages, 4, 4
----------------------

Which a error pop-up with 'There isn't enough memory to perform this
operation. Close unneeded programs and try operation again.' , so I added
the
line 'Set Applicatin.Printer = Nothing', and same error message show up
again.

By the way, I am using 'Access 2003'.

Hope to get your help! & Thank you again!


Regards,
Frank

Douglas J. Steele said:
Why are you setting Application.Printer to Null?

See what happens with just

DoCmd.PrintOut acPages, 1, 1
DoCmd.PrintOut acPages, 4, 4
 
In addition to my other suggestion, is the report set up for the default
printer, or for a specific printer? Do you have the most up-to-date drivers
for the printer?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


frank said:
Dear Mr. Douglas J. Steele:

Thank you very much for response!

Actually, my first version was the same as you mentioned.

----------------------
DoCmd.PrintOut acPages, 1, 1
DoCmd.PrintOut acPages, 4, 4
----------------------

Which a error pop-up with 'There isn't enough memory to perform this
operation. Close unneeded programs and try operation again.' , so I added
the
line 'Set Applicatin.Printer = Nothing', and same error message show up
again.

By the way, I am using 'Access 2003'.

Hope to get your help! & Thank you again!


Regards,
Frank

Douglas J. Steele said:
Why are you setting Application.Printer to Null?

See what happens with just

DoCmd.PrintOut acPages, 1, 1
DoCmd.PrintOut acPages, 4, 4
 
There must be some objects in memory, and it's not printer object.

I tried the code below and it worked.
-----------
DoCmd.PrintOut ,1,1
DoCmd.PrintOut
-----------

Douglas J. Steele said:
In addition to my other suggestion, is the report set up for the default
printer, or for a specific printer? Do you have the most up-to-date drivers
for the printer?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


frank said:
Dear Mr. Douglas J. Steele:

Thank you very much for response!

Actually, my first version was the same as you mentioned.

----------------------
DoCmd.PrintOut acPages, 1, 1
DoCmd.PrintOut acPages, 4, 4
----------------------

Which a error pop-up with 'There isn't enough memory to perform this
operation. Close unneeded programs and try operation again.' , so I added
the
line 'Set Applicatin.Printer = Nothing', and same error message show up
again.

By the way, I am using 'Access 2003'.

Hope to get your help! & Thank you again!


Regards,
Frank
 
I designed a new form which is identical to original one. and it works.
Interesting!!

Douglas J. Steele said:
In addition to my other suggestion, is the report set up for the default
printer, or for a specific printer? Do you have the most up-to-date drivers
for the printer?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


frank said:
Dear Mr. Douglas J. Steele:

Thank you very much for response!

Actually, my first version was the same as you mentioned.

----------------------
DoCmd.PrintOut acPages, 1, 1
DoCmd.PrintOut acPages, 4, 4
----------------------

Which a error pop-up with 'There isn't enough memory to perform this
operation. Close unneeded programs and try operation again.' , so I added
the
line 'Set Applicatin.Printer = Nothing', and same error message show up
again.

By the way, I am using 'Access 2003'.

Hope to get your help! & Thank you again!


Regards,
Frank
 
Back
Top