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

What is DoCmd.RunCommand acCmdPrint printing? 1

Status
Not open for further replies.

JBG

Programmer
Oct 22, 2001
99
0
0
US
Hi,

I am using/calling

Code:
DoCmd.RunCommand acCmdPrint

in a function called by a macro. The call can be initiated in several portions of my Access 97 database when the user clicks on a custom toolbar.

My queston:

How can I tell WHAT is being printed? I know I can use IsLoaded to find out if, say, MyReport is loaded, but how do I find out if MyReport is what is being printed?

In other words, how do I find out what the active form is at the same time

Code:
DoCmd.RunCommand acCmdPrint

is executed?

Thanks!

JBG
 
Hiya,

Hope this gives you an insight, I also hope some expert kicks in and proves me right or wrong.

However, I think that when you send a print instruction to a device (print server pc (spooler) or dedicated then the whole document is sent to that server and it returns a 'received-ok' signal.

From then on - your client has nothing to do with it - it's spooled and will be printed (if the printer doesn't malfunction)

I know that specific printer software keeps 'tabs' on the process from the client - waits for an error, but how to get to the software interface - ?

I can't logically think of a way of finding out what 'has focus' that 'has been sent to a printer', because focus is lost after the info. has been sent to the printer.

I can only suggest 'global' variables, to store WHEN they sent the print and possible error codes.

Regards,

Darrylle



"Never argue with an idiot, he'll bring you down to his level - then beat you with experience."
 
Hi,

Thank you for the reply. I am indeed using a global variable to tell me the report has been opened. But it is not going to be accurate as the user can minimize the report, print something else, then close the report, etc.

I too am hoping another expert can tell me/us how to identify either what form has focus at the exact moment the printer is called, or what was just printed.

Thank you for taking the time to reply. This message board and the folks who take the time to respond are such a help to dolts like me :)

Jeff
 
JBG,

I'm not sure if this applies in Access 97, but in Access 2000 you could do

docmd.printout acSelection

and that would give you only what is active at the time.

HTH,

Griz
 
Yup, I can do that same in 97, but that code prints the active object.

What I need is something like (to test):

msgbox acSelection

which tells me what is being printed. And the code needs to reside on a module that can be called from multiple areas of the program to print the current object/selection.

Unless I misunderstood your reply?

 
Man, am I a doink.

My programmer friend called me and in the midst of conversation told me that

Code:
Screen.ActiveReport.name

is the ticket.

Well, it was what I was looking for , but didnt know it existed.

Now I do.

Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top