Private Sub Command167_Click() On Error GoTo Err_Command167_Click Dim objWordApp As Object Dim objWordDoc As Object Set oApp = CreateObject("Word.Application") 'make word not show up to user objWordApp.Visible = False set objWordDoc = objWordApp.Documents.Open(C:Documents and SettingsUserDesktopEXPRESS DIPLOMA LETTER.doc) objWordDoc.PrintOut 'quits word objWordApp.Quit Set objWordDoc = Nothing Set objWordApp = Nothing Exit_Command167_Click: Exit Sub Err_Command167_Click: MsgBox Err.Description Resume Exit_Command167_Click
End Sub
I am trying to print a letter from access when a comand butting is pressed. It returns syntax error on this line:set objWordDoc = objWordApp.Documents.Open(C:Documents and SettingsUserDesktopEXPRESS DIPLOMA LETTER.doc)
I'm designing a database in which the primary key is a combination of the first letter of first name, the first letter of last name and the date of birth.
ok here is what i want.. imagine a search box, just an empty text box that allows the user to type things into it...
there will be a simple table from the database behind it, here is the typical structure of a record
<Country>Poland <Price1>60 <Price2>85 <Price3>95
in this table there will be say a 1000 of these records... my user is going to have to quickly search through these records while on the phone to a customer, and quote one of the relevant prices associated with that country
what i would like is this most convenient system.. as the user types in the letter 'P' just below all the records with countries that begin with 'P' are displayed (with a scroll down arrow if needed)..as well as the 3 relevant prices with that record
if they then type an 'O' into the box (which will now hold 'Po') all the records with countries beginin with 'Po' will be displayed (eg Poland)
if they delete the 'o'. once again the displayed records below the box will return to just the countries begginin with 'p'
all that is needed is for the records to be displayed, thats it.. but the adding and deleting of the letters within the text search box will need to instantly manipulate this list..
i have posted on other forums, and have been told this can be acheived in access, is it hard?
I need to generate a pre-formatted letter from within MS Access, where the name, address and other information will be pulled from the current record on an Access Form. Basically it is like a welcome letter I could send to any new client I enter into the data base. Since I am doing one letter at the time, mail merge in MS Word is not an option What would be the easiest way to do this? Thanks
I've inherited a few Access DB monstrosities. One of which had ODBC credentials hard coded in the MDE which I had to recently update due to some server updates. I found an unsplit version of the Access DB on a development drive (j:db...) and updated the credentials hard coded in VB and updated the linked tables from the J drive path (dev) to the K drive path (prod). I then split the DB and the MDE worked fine for me. I quickly found out that it only works fine because I had J mapped still. End users do not have the J drive mapped (development) only the K (production). Without the J drive mapped to the actual dev path the Access DB simply doesn't load. No errors.
I then tried to find any references to J in VB and fix those. At this point I can't seem to find anything else that could be referencing the J drive but still the DB will not open without J mapped.
I am using an MS Access 2010 table as a data source for a mail merge. I would like to update a field in the table with the date that the letter is printed. Is there a way to do this?
I was having trouble just setting each report with a particular print method - for some reason they just kept forgetting their individual settings and resorting to default on the machine.
This meant reports were printing on the wrong paper, or the wrong size paper, the wrong orientation and some times refusing to print if it couldn't find the paper (which is useful in runtime as it doesn't display error messages)
So I used Reports(rpt).printer properties (I forgot where I found this) to hard code the printer properties into each print command... this meant I had to use another function to insert the variables.
So all I had to do was say:
Code: PrintMe("Invoice","InvoiceID",iID)
and a report would print to exactly how I wanted... but it's just too slow!
See attached for full code, I have a niggling feeling it may be the function: PrinterOK, to make sure the printer exists or not.
Code: Function PrinterOK(sPrinterName As String) As Boolean Dim MyPrinter As Printer PrinterOK = False For Each MyPrinter In Printers If MyPrinter.DeviceName = sPrinterName Then PrinterOK = True Exit Function End If Next End Function
I know it's the printing code, because if I stop the printing and just preview then it shows up almost instantly.
I have a report in access. I have designed the report such that. When a user wants to print there is a prompt for the user to enter the order number.The report displays all the orders for that order number.A number is assigned for that print out.This number is unique for every order number the user enters.
How do i capture the generated print out NUMBER, store it in a table so that when there is another printing for the same order number No NEW PRINT OUT NUMBER is displayed.The user should also be prompted that he/she is printing an already printed orders. However in case of a new order number, the generated print out number should be differnt which should also be stored for future refencing.
I want to be able to create a background image as a watermark for Access Reports when they are printed. Now, as I can figure, the Report has a "Picture" property which I can use to set this.
The catch is, the contents of the background image is not static, it must be generated on-the-fly. (for example, it can contain the date of report generation) So, I think, that's ok. I'll need to create an ActiveX object that will generate the image, then I'll assign the image to the picture property using VBA.
Now, my concern is, can I set it up such that even if users create a new report in the database, this behavior can still be automatically done? Is there a way?
Also, would it be possible to set a background image for query results also?
Here's a weird problem I've had develop in the past couple months, before I upgraded to 2007, and now since I upgraded to 2007.
I've had the same Access database since 1997, and just recently upgraded it to Access2007, but as I said the problem occurred before and after the changeover.
I have two servers at the office. Server #1 (where the database is located) has attached to it is a dot matrix printer, used for printing our 4 part invoices/packing lists. I have another server (#2) which has a laser printer attached to it. The laser printer on server #2 is the default printer for all computers in the office. I have a lot of reports in Access where the printer to be used is the default printer. I have a single report in Access where I specified in the page design and layout to use a specific printer - the dot matrix on server #1.
Both servers are always on. Both printers are always on. I can go for weeks and weeks with no issues in printing the invoices. Then suddenly I'll get a
"This document was previously formatted for the printer (printer name) on (server #1), but that printer isn't available. Do you want use the default printer (\server#2laser printer) ? OK CANCEL SETUP... HELP
It worked fine for 9+ years, and now I am getting this error. No new computers in the last 2 years. No new printer installs in the last 2 years.
I've gone through, uninstalled the printer, reinstalled the printer, both on the server and remote machines, and now I can't even get the report to "remember" that I want it to always print to the dot printer.
I would like to be able to print PDF Files from MS Access 97. I have a table with records containing all the information necessary to create full pathname of the file (i.e. strPathName). But how do I get it to print (not view) the file once the record is selected from a drop-down box. Do I have to create a module to do this? Or is there some simple trick? If anyone has come code for doing this, it would be much appreciated. Thanks!
I have an Access Database installed on a server that is accessed remotely by numerous users. I have a button to print out a specific report. The problem is that in order for a user to print the report their print driver must be loaded on the server. Due to the number of users, and the numerous types of printers available, this is impractical. The current code on the button is currently:
Private Sub Command PrintReport Click() Dim strWhere As String strWhere ="[Property Number] = " & Me.[Property Number] DoCmd.OpenReport "RESERVE REQUIREMENT REPORT", acViewNormal, ,strWhere End Sub
I would like to know if there is some code that would send the report to PDF, so that any remote user could then print the report from PDF.
I have 2 single-page Access reports. The first report has the following fields: FirstName, LastName, StreetName, HomeNumber. The second report has the following fields: MerchantA, MerchantB, MerchantC.
The data for the first report are taken from tblBuyers, the data for the second report are taken from tblMerchandise.
I need to print 2 copies of the first report and 4 copies of the second report for the first Buyer, then 2 copies of the first report and 4 copies of the second report for the second Buyer and so on. Can I help on this problem ? Rgds
I have limited users to not show the ribbon, but I need them to be able to print of reports or export them as pdf files how do I give them access only to do this ?
I have an Access program that prints various reports with a button.I would like to view the report in full screen prior to printing, how do you do this?
Hi, this problem came out of nowhere but looks like it's here to stay.
Our Access app generates various Access Reports. Recently we installed a new version of our access app and since that version onwards, all pc's with Office XP/2003 print reports in black & white. Printing to PDF works fine though.
We can't find the reason for this. Which mean we had to go to all our clients to downgrade them from office XP/2003 to 2000!
I have created a from containing names and address. On This form I have a checkbox called "MailLetter" and a command button called "Sendletter".
I place a check in the box corresponding to specific people, then using a command button a letter is printed to ONLY THOSE WHO ARE CHECKED.
The letter is a Word document that resides on the desktop.
Here is the code behind a command button to print. Not sure if it is correct:
Private Sub Command2600_Click() Dim WordObj Set WordObj = CreateObject("Word.Application") WordObj.Visible = True WordObj.documents.Open "C:Documents and SettingsUserDesktopLetter.doc" End Sub
I assume this can be done through some sort of mail merge?
So I'm having timing issues trying to print data from an Access (actually SQL Server) based query to a Excel Spreadsheet. Basically I'm trying to get around using MS-Query and last week I didn't seem to have any problem as far as performance. However, when i tried running today it seems I've had a slow down of at least 500%. The data I'm trying to print is quite large (few hundred records and about 140 fields) so I expect some performance issues. Like I said though i just can't undestand the decrease. Possibly machine performance?
Anyhow, I've tracked the bottle neck and no suprise it is in the loop, I'm just suprised it takes so long to loop through the recordset.
Here's my code, any help will be appreciated?
'Generate grid to dump data If intRecordSetCount > 0 Then rst.MoveFirst 'Loop through length and width and display results Do Until rst.EOF intRSTField = 0 intFieldCount = intField For intIndex = 1 To intColumnCount
I have recently changed computers from a WindowsNT to and XP. When using the NT machine, I am able to print my Access report. However, when I hook up the XP machine and request a report from one specific database, I get the following message....this message also comes up if I try to open print preview or page setup.
"There was a problem retrieving printer information for this object. The object may have been sent to a printer that is unavailable."
I don't think it is a printer error as the error is occurring in this one database. I have successfully printed a test page and can open up other Access databases and print. I also tried converting the database to the 2002 format....but that did not make a difference either. There must be a setting in the database that is causing the error.....
We have run into a problem with Access 2013 when trying to print reports. The program always crashes. Have updated printer driver for the HP LaserJet P2035.
I am running Access 2013. I have created a report where the tables are linked to a SQL DB
I am trying to run a sales report that includes an stored image.
I am adding an Image and then using the control source to look up the 'filepath' stored in the DB. When I run the report on screen all the images are showing but when I try to print it (including exporting to PDF or XPS) and Print Preview only 2 of the 9 images print per page. The images are around 2-4 Mb.
I'm guessing its to do with the files sizes but cannot do anything about the size.