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

How to print flawless

Status
Not open for further replies.

Holm78

Programmer
Mar 5, 2002
60
SE
Hello

I have a Form and a Report. In the form I have a button with the code:

report form rep_test.frx to printer

When I press the button the report prints out perfect, but when I am back att the form and press print again it prints out the report result on the Form and behind my objects and alos on the printer as it should do????
And other errors aswell.

U fellows need more info on my prob?

Thanks for suggestions...

//Holm
 
Holm78

In the load of your form put :
SET TALK OFF


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
HOLM78

Pressed the submit to quickly, you shoudl also use:
report form rep_test.frx NOCONSOLE to printer


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Thanks Mike

One problem stands

In my next record button i have:

select myTable
skip
if eof()
messageb('my mess',0,'Message')
go bottom
endif
thisform.refresh()

And when i press that button when i have printed and I stand on my last record, program error ocures with expanation end of file encourage...

//Michael


 
The problem is that after the report ran, you were already at the end of the table. Therefore SKIP was impossible and generated the error. You could add another IF EOF() / ENDIF around the SKIP command, as long as that logic still matches what you're trying to do.
 
Oops, I meant to say the test needed before the SKIP was IF ! EOF()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top