Access Macro links to Word Template - NEED TO UPDATE DATA - HELP (1 Viewer)

pipers4323

New member
Local time
Today, 02:26
Joined
Dec 3, 2009
Messages
1
Hi,

I hope this is the right section. We currently have an Access database
managing our inventory. When you need to generate a Sales Invoice you click
on a button that launches this Macro:

Private Sub SalesInvoice_Click()
On Error GoTo Err_SalesInvoice_Click

Dim stDocName As String

stDocName = "frmSalesInvoice"
DoCmd.OpenForm stDocName, acNormal

Exit_SalesInvoice_Click:
Exit Sub

Err_SalesInvoice_Click:
MsgBox Err.Description
Resume Exit_SalesInvoice_Click

End Sub

The macro then links to a Word template that pulls all the data from the
Access table and populates the Invoice in word.

I need to update the Invoice by removing one field and replacing it with a
new field. I have added the new field to our main table but I can't get it
to show up in the Word document. I have tried to edit the template and
replace the field name but no luck.

I am not very Access savy and could really use some help with this. Oh, and
I am using Access 2007 and Word 2007 on a Windows 32bit Vista Home Preimum OS

Thanks!
 

wiklendt

i recommend chocolate
Local time
Today, 19:26
Joined
Mar 10, 2008
Messages
1,746
you may find it would be easier to create a report in your database, rather than the complex action of exporting data to other office software. the reports can then be printed/exported to pdf for cross-platform accessibility.

that is, unless you are doing something like mail-merge or email attachments or the like.
 

mikebaldam

Registered User.
Local time
Today, 10:26
Joined
Oct 29, 2002
Messages
114
Or check the word document, put it into mailmerge view (click tools - mailmerge) and a new toolbar shows up and check to see if you can select your new field in there (insert merge fields).

If you cant check the db query you call into the word doc and add the extra field then check the mailmerge fields and add the new field then.


(Making it a report is probably best in the long run though)
 

DCrake

Remembered
Local time
Today, 10:26
Joined
Jun 8, 2005
Messages
8,626
The problem with using word templates from Access is that when you send the word doc to someone it will contain the embedded links to the access database, which is what you don't want.

David
 

Users who are viewing this thread

Top Bottom