473,322 Members | 1,259 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Select Printer

Ian
I have an Access 97 database, on a Report I have the print option set to
print to the PC’s default printer rather than a printer selected from
the list.

My question is: Can I allow the user to change this setting so that by
default the report will print to a specific printer that they select
rather than the PC’s default printer?

The reason for wanting to do this is that I don’t know the names of the
printers they might have and the DB is an MDE so they cant go to design
view and change it themselves.
Mar 17 '07 #1
4 4512
I did this once

I think I used a macro to activate the print dialogue box
Then assign the Macro to a tool bar
Then assign the tool bar to the report.

In this way the icon on the tool bar that appears when the report shows call
the print dialogue box rather than just printing the report to the defined
printer.

I expect you can also do the same with code and while macros are old and
clunky they can still solve simple problems in a simple way.

I also added other report related buttons to the button bar such as a close
button that closes the report and reverts to whatever other forms should be
open.

Seemed to work OK as non of the database users complained

Hope this helps

Andrew Hall
"Ian" <ia********@ntlworld.comwrote in message
news:Gk*****************@newsfe2-gui.ntli.net...
I have an Access 97 database, on a Report I have the print option set to
print to the PC’s default printer rather than a printer selected from
the list.

My question is: Can I allow the user to change this setting so that by
default the report will print to a specific printer that they select
rather than the PC’s default printer?

The reason for wanting to do this is that I don’t know the names of the
printers they might have and the DB is an MDE so they cant go to design
view and change it themselves.

Mar 17 '07 #2
Ian
Thanks
>
I already have code that calls the windows dialogue box and allows the user to select a printer. What I want to do is have them just click Print and this one report automatically goes to a specific printer other than the PC’s default printer.

Regards


Ian wrote:
I have an Access 97 database, on a Report I have the print option set to
print to the PC’s default printer rather than a printer selected from
the list.

My question is: Can I allow the user to change this setting so that by
default the report will print to a specific printer that they select
rather than the PC’s default printer?

The reason for wanting to do this is that I don’t know the names of the
printers they might have and the DB is an MDE so they cant go to design
view and change it themselves.
Mar 17 '07 #3
If I remember correctly, the printer can only be set at design time. I
think all you can do is allow them to select from the Printer dialog.

Mar 17 '07 #4
You can pop up the standard print dilaog.

DoCmd.RunCommand acCmdPrint

if you *must* prsent a list of printers BEFORE you want to lanuch the
printer, then I have a working sample for a97 here:

http://www.members.shaw.ca/AlbertKal.../msaccess.html

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com
Mar 17 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Patrick Herb | last post by:
Hello, I'm trying to print the content of a RichTextBox from my VB 6 app. What I want is that the CommonDialog shows up, the user selects a printer and the content of the RichTextBox prints to...
2
by: MLH | last post by:
I would like to allow users to set, as an application default, a specific printer to send reports to. I don't know how to bring up a list of valid print devices in A97, nor do I know how to...
1
by: Karthic | last post by:
When i right click on the .rpt file in the VS 2003, i see a property printer setting. It says "No printer" on the top and there is option to select printer and paper settings etc.. I want to...
1
by: Darrell Wesley | last post by:
Is there anyway to hook the PrintDialog to the printer icon on the PrintPreviewDialog? I know that you can print a document using the PrintDialog but it does not allow previewing and the...
0
by: hamil | last post by:
I have a graphic file demo program that almost works. My form has a PageSetupDialog, PrintPreview, PrintDialog, and a PrintDocument control. Sample code follows. Now here is the quesion. When I...
2
by: Wayne | last post by:
I'm using the following line of code to print only the first page of a report: DoCmd.PrintOut acPages, 1, 1 This works fine with one limitation. It sends the report to the default printer. ...
0
by: mafandon | last post by:
Hello all... My application uses custom reports from Microsoft's report viewer and not Crystal Reports. My understanding is there is no way to make the printdialog select a different printer...
1
by: cmos1981 | last post by:
Visual Basic 6.3 - i am auto printing a screen using vb. i dont want the print dialog box to appear. the page should just print to the default printer. alternatively if i could use "sendkeys" to...
2
by: =?Utf-8?B?SkxvYm8=?= | last post by:
How can i open a dialog box to choose a printer? -- JLobo
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.