Printing A Letter From Access

Aug 18, 2004

Dear All:

I have created a print command button on a form. When this button is pressed, It should print a Word document.

I have composed this document in Word already.

Any ideas on how to do this?

Many thanks in advance,

Dion

View Replies


ADVERTISEMENT

Printing A Letter From Access

Aug 20, 2004

Dear all:

Code:

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)

HELP!!!

Many thanks,

Dion

View 2 Replies View Related

Storing The First Letter Of First Name, First Letter Of Last Name And Data Of Birth

Feb 19, 2006

Hi,

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.

How can I do that?

Regards,
CS

View 8 Replies View Related

Letter By Letter Search Through A Table

Aug 21, 2005

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?

View 9 Replies View Related

Generating A Letter From MS Access

Jun 20, 2006

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

View 9 Replies View Related

Queries :: Possible To Extract First Letter Of A Surname In Access Query?

Jun 11, 2015

is it possible to extract the first letter of a surname in an Access Query? Below is my sample data, and below that is what I want to acheive.

Player Name
Hart, Joe
Cech, Petr
de Gea, David
Szczesny, Wojciech
Mignolet, Simon
Reina, Pepe
Lloris, Hugo
Howard, Tim
Begovic, Asmir

What I want the query to return:

Player Name
Hart, J
Cech, P
de Gea, D
Szczesny, W
Mignolet, S
Reina, P
Lloris, H
Howard, T
Begovic, A

View 6 Replies View Related

Access DB Not Opening If Specific Drive Letter Not Mapped

Mar 25, 2015

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.

View 3 Replies View Related

Update MS Access Field When Mail Merge Letter Is Printed

Apr 6, 2015

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?

View 5 Replies View Related

Modules & VBA :: Printing Code Slowing Down Printing Reports?

Feb 25, 2014

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.

View 1 Replies View Related

Printing From Access

Jul 25, 2005

Hello,
I have one machine that gets this error when trying to print or e-mail a report:
the microsoft jet database engine could
not find the object

Any other machine can print from this db.
Access 2003. XP Pro, SP2.

View 7 Replies View Related

Printing In Access

Nov 18, 2004

Hi

Anyone who can help me out?


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.

Please help

View 3 Replies View Related

Printing With Watermark In MS Access

Aug 29, 2005

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?

View 2 Replies View Related

Access Printing Woes.

Mar 19, 2007

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.

Any ideas?

View 1 Replies View Related

MS Access 97: Printing PDF Files

Sep 14, 2004

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!

Malcolm
Tulsa, OK

View 1 Replies View Related

Printing Report To PDF In Access

Oct 22, 2015

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.

View 2 Replies View Related

Printing Sequence Of Access Report

Sep 6, 2004

Hi,

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

View 1 Replies View Related

General :: Printing Reports To PDF Access Only

Jun 30, 2014

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 ?

View 3 Replies View Related

How To View Access Report Before Printing It

Aug 20, 2014

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?

View 6 Replies View Related

Printing From A Locked Access Database

Mar 4, 2013

I have an .accde database that will not let my print button to work. How do I print from an .accde database?

View 2 Replies View Related

Printing Text Files From Access 2003

Mar 6, 2006

Can anyone help? I need to find a way to send text to my printer in Access 2003. All I can find is information regarding printing reports.

View 1 Replies View Related

Printing Problem With Access Versions &gt;2000

Mar 16, 2006

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!

We use mainly Xerox and HP printers.

Thanks!

View 2 Replies View Related

Printing Letters To Specific People Through Access

Feb 23, 2005

Dear All:

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?

Thanking in advance.

Regards,

Dion

View 3 Replies View Related

VBA - Printing Access Query Results To Excel Spreadsheet

Dec 13, 2004

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

Worksheets(strWorksheet).Cells(intRowCount, intFieldCount).Value = rst(intRSTField)
intFieldCount = intFieldCount + 1
intRSTField = intRSTField + 1

Next intIndex
intRowCount = intRowCount + 1
rst.MoveNext
Loop
Else
MsgBox "Recordset has not been initialized or does not exit"
End If

'Define name range
ActiveWorkbook.Names.Add Name:=strRangeName, RefersTo:= _
"= '" & strWorksheet & "'!R" & intRow & "C" & intField & ":R" & intRowCount & "C" & intFieldCount, Visible:=True

View 5 Replies View Related

Error Printing A Access Report To An Epson Printer

Jun 14, 2005

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.....

Does anyone have any suggestions???

View 5 Replies View Related

Queries :: Access 2013 Crashes When Printing Reports?

Dec 9, 2013

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.

View 1 Replies View Related

Reports :: Access Report Only Printing Some Image Files

Apr 20, 2015

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.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved