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

External Compacting and also a printer problem

Status
Not open for further replies.

scrano

Technical User
Jan 24, 2001
51
AU
I actually have 2 problems. Please help.
The first is I have designed a maintainance database for another database that I have, I need to be able to run a compact and repair from within it, which I can do but I want to be able to put a string into the Visual Basic code for the command button so I don't manually have to point to the location of the database that I want to compact and repair.
My second problem is that I have a Hewlett Packard 640c printer set up to print the reports (got the latest drivers), every time I print a report and try to continue on using the program I starting getting Visual Basic Run Time errors (mainly 2486). Up until I print everything works fine. Any help anyone could provide I would be very grateful for, Thanks in advance.
 
to compact another database you could use the shell function in vba to execute a command like:

Shell( """c:\program files\.....\msaccess.exe"" /compact ""c:\database.mdb""", vbMinimizedNoFocus )

Did you try to use an other printer to test if it is an access problem or printer driver related ?
It can be any driver from your windows installation cd if you redirect the output to a file.
 
Thanks Heaps Hennep. I have actually also tried a HP 670c and it doesn't appear to be an issue with it. Thanks again for the help with the compacting question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top