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

Acc97: End user printer control / compacting impossible? 1

Status
Not open for further replies.

JasonUMD

Programmer
Dec 12, 2001
9
JP
I'd like to add this functionality into my project, but it seems impossible.

It's a split database (DB_FRONT.mdb & DB_DATA.mdb)

1. End-user printer selection:
There are 3 categories of reports. I would like the user to be able to view a list of printers, and select a printer for each category of report.

Example (from a form):
All full page reports go to the laser printer (Networked)
All receipts to receipt printer (LPT2)
All labels to label printer (LPT3)

Of course, I can set this up myself from each report's design view, but every machine has a different printer configuration.

Also, I can set all reports to print to default printer and then instruct the user to switch default printer from Windows, but this is inelegant also.

2. End-user compact back-end database
From a menu selection in DB_FRONT.mdb I want the user to be able to compact DB_DATA.mdb

This will also allow backing-up the back-end database during compacting.

I've studied the Access97 Developer's Handbook, MSDN, and help at great length for this, but can't find what I need.

Please let me know if I need to clarify what I am trying to achive, or if I am trying to do something that Access simply will not allow.
 
1) The simple way to select printers is to change the Windows default printer in WIN.INI using WriteProfileString of the Windows API. See article Q208840, and others, at microsoft.com. If you really want to get into printer nitty-gritty, see the following article:


2) The simple way to compact the backend DB is to make sure it is closed, then use the DBEngine.CompactDatabase method. You might also use the Shell command to launch a second copy of Access and pass it the /compact switch in the command line arguments.
 
Thank you for the pointers, the article you linked to is also the same as Ch. 10 in the Access 97 Developer's Handbook - which I have been referencing, I'll re-read it.

Perhaps I was just giving up too early?

In any case, thanks again for the help, and I'll get back to work on it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top