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!

Select printer from toolbar? 2

Status
Not open for further replies.

thatguy

Programmer
Aug 1, 2001
283
0
0
US
Hey there --

I have a nice database which works wonderfully - but of course, the higher-ups want changes! I have an option to Preview reports or send them directly to the printer. When the user checks the Preview box, the report comes up in Preview with a custom toolbar, which includes the Print button, buttons to change viewing size and Close. What I need is some way to bring up the Select Printer... dialog box (the one that shows up when you click File->Print) without including the File Menu and without allowing right-clicking from the report. Is there anyway to do this? Ideally, I would want the user to click the Print button from the custom toolbar and have the Select Printer come up. This is all so the user can choose to print to a PDF or to the printer. Any thoughts?

Thanks
-- michael~
 
try this...

the idea here is to use Send Keys

1create a new macro 2in the Action column choose Send Keys
3at the bottom in the Keystrokes field type ^p (You are telling Access to key Control P.)
4choose no for the Wait field
5save the macro - name it Print Setup (or whatever you like. you will see later that what you name it could be important.)
6from the main menu go to View - Toolbars - Customize
7under the Toolbars tab select your custom toolbar from the list
8go to the commands tab and in the Categories list choose All Macros
9from the Commands list to the right, select the macro you created in the steps above, and drag it to your toolbar so that it shows up as a menu option
10right click on the button you just created and you will see a lot of options
down the list there are options Text Only, Image and Text, etc (this is your preference)
11after selecting the options you want, close out of the Customize window
12open a report and try it out

does this work ok?

i hope this helps you.

 
sorry Michael, i mistakenly keyed a 2 in the first step. please disregard the 2.

cary

 
sorry again Michael, you do need Step 2.
i thought i had miskeyed, but apparently the text didn't wrap properly when i submitted the post.

Please do not disregard Step2. it is very important.

let me know if it works for you.
 
Perfect!! Thank you so much, Cary! That works wonderfully!


-- michael~
 
cghoga ---

This is exactly what I'm after! Didn't think to use a macro as a toolbar button.
(I can't figure out why Microsoft only has template button for Printing to default printers anyway!)

Thanks Again!
Chris

"It doesn't matter how idiot-proof you make it, someone makes a better idiot!"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top