Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to detect clicking of Print Cancel button.

3 views
Skip to first unread message

user

unread,
Feb 6, 1997, 3:00:00 AM2/6/97
to

hi,
Currently, I am doing an Access assignment involing printing and looping.
The Print dialog box appears and disable my form. I wish
to allow the user to Cancel printing.
Currently, I use a API in USER.EXE GetKeyState() to detect the user input.

The code is something like this:
Loop
SQL query
nStatus = GetKeyState(1)
if nStatus = 1 then exit Loop
DoCmd Print

So as long as the user clicks the mouse button, the loop will exit. (Not
very Neat)

I hope to detect that as long as the user clicks on the Cancel button in
the
Print Dialog box, the loop exit.

Any comments and suggestions are welocme.

Thanks in advance
Darren Tan
dar...@letterbox.com

0 new messages