468,738 Members | 2,333 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,738 developers. It's quick & easy.

QueryPageSettings problem

When I print QueryPageSettings gets called a few times before PrintPage is
called.

I just occurred to me that the problem may be that I do AddHandler each time
I print.

Is that wrong?

If so, is there something I can check to see if a handler has already been
added?

I suppose I could do the AddHandler when I define gAddressesPD but that is
done in a module and I don't know if the module can reference a method in a
form.

Thanks in advance

Public Sub PrintClick()

gAddressesPD.PrintController = New StandardPrintController

AddHandler gAddressesPD.PrintPage, AddressOf -snip

AddHandler gAddressesPD.QueryPageSettings, AddressOf -snip

-snip
Nov 20 '05 #1
2 1377
Please see code at bottom of note

" Just Me" <ne********@a-znet.com> wrote in message
news:ei**************@TK2MSFTNGP11.phx.gbl...
When I print QueryPageSettings gets called a few times before PrintPage is
called.

I just occurred to me that the problem may be that I do AddHandler each time I print.

Is that wrong?

If so, is there something I can check to see if a handler has already been
added?

I suppose I could do the AddHandler when I define gAddressesPD but that is
done in a module and I don't know if the module can reference a method in a form.

Thanks in advance

Public Sub PrintClick()

gAddressesPD.PrintController = New StandardPrintController

AddHandler gAddressesPD.PrintPage, AddressOf -snip

AddHandler gAddressesPD.QueryPageSettings, AddressOf -snip

-snip

Nov 20 '05 #2
I just used a variable to keep track of adding the handlers.
That fixed it.
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Bruce Davis | last post: by
117 posts views Thread by Peter Olcott | last post: by
28 posts views Thread by Jon Davis | last post: by
6 posts views Thread by Ammar | last post: by
reply views Thread by SamSpade | last post: by
2 posts views Thread by Mike Collins | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
xarzu
2 posts views Thread by xarzu | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.