Problem With Make Table Query And Merge To Word Template

May 23, 2005

Hi guys!

I have my word template set up such that some data is copied from the open form into the document and some data is taken from a table which is created from a query based on the content of the form (the record number). This works well HOWEVER (there's always a however isn't there :rolleyes: ) where two users click on the button at exactly the same time or within a very short space of time the query only runs once and either the database crashes (bad) or the document is created for the second person with the wrong data (very bad).

How can I make it so that only one person can run the query at a time (ideally build in a delay in processing so that the query will run for them when the first person has finished...failing that a message to say please try again later)? They will always be working with a different record.

I'm a bit stuck as to what to search for in the forum for an answer to this so haven't really searched.....sorry :(

Many thanks
Jo

View Replies


ADVERTISEMENT

I Have A Template In Word

Jul 11, 2005

and I want to write in some places


I know to open the word
and write in to the word


to write in to word:

Dim objWord As Word.Application

Set objWord = CreateObject("Word.Application")
objWord.Visible = False 'True is visible
objWord.Documents.Add ("C:DocumentsTest.dot")
objWord.ActiveDocument.Bookmarks("bmCusDetails").Select
objWord.Selection.Text = Forms![a]![b]


objWord.Visible = True


but how am I write in a special place?

thanks alot, and sorry on my english

View 1 Replies View Related

Link To A Word Template

Jan 23, 2008

Hi I have a database and I want to basically use table fields to load into a Word template and I want this done via code, i.e a button....any help very much appreciated!

View 1 Replies View Related

Linking Access To A Word Template

Feb 16, 2006

i have a form and was wondering if it was possible to take some of the fields and drop them into a template word document from inside access. so as to create a button that when clicked opens up the template and transferes the wanted form data.

any idears how to automate this process would be greatly appreciated

thanks in advance john

View 2 Replies View Related

Reports :: Exporting Data To Word Template

Apr 7, 2014

I have a Word template that I require my data to be exported to. Is there a way to import a .docx into a report design?

View 1 Replies View Related

Modules & VBA :: How To Save Word Template As HTML

Apr 29, 2014

I'm using the below to merge an access form into a word template (it's a starter for 10).

That works fine. What I need to do is save the word template as HTML so I can then upload it to my website.

Dim wordApp1 As Word.Application
Dim docPath1 As String
Dim fileName1 As String
Dim PageName As String
PageName = Forms!Frm_Page_Create![Page]
docPath1 = Application.CurrentProject.Path & "Merges"

[code]....

View 1 Replies View Related

Populating Word Template From Form In Access

Mar 7, 2013

I am creating a db for my work place that records incidents that take place. I am a novice at Access but I have made different tables, queries, forms and reports and they all work.

I was wondering if there was a way to extract data that a user enters into a form and then use that to populate a word template *without* coding using VBA? I am really a beginner and not confident with VBA at all. I have read the forum and that seems to be an option (but would rather something else if possible!)

View 3 Replies View Related

Modules & VBA :: How To Insert Data From Access To Word Template

Jul 28, 2013

I'm doing a project for my work. I created a few reports in Access. Some of these reports are simple graphic bars. How can I insert these reports into a word document template?

View 2 Replies View Related

Modules & VBA :: Export Single Record To MS Word Template

May 25, 2015

I am working in Access 2013.I'll be performing a series of inspections at a number of intersections for a small community. The data being captured is consistent from site to site and lends itself to a database application, and what I would like to do is the following:Use forms to capture the data.Generate a report to preview the output for a single record. I may ultimately decide to set the report datasource to a query.Attach a macro to a button that exports fields from that record to a template based in MS Word.The first two bullet items I can handle with my limited Access capability. Each file has to be individually reviewed and saved, and each file will ultimately contain an electronic signature.

View 2 Replies View Related

Modules & VBA :: Send Form Fields To Word Template?

Jul 2, 2015

I have a form with fields that contain the address/postcode etc of the person in question, and I also have a template letter that needs to have said persons address/postcode etc at the sending stage after a button is clicked.

View 9 Replies View Related

Modules & VBA :: Change Check Box Values Of -1 To YES And Then Fill Word Template

Jul 26, 2013

I have the following VBA code that auto populates a word template:

Private Sub Command24_Click()
On Error GoTo ErrorHandler:
ErrorHandler:

[Code].....

The code executes flawlessy but there are three values that are based off check boxes set as YES/NO (EMPLOYEDATREGISTRATION, EMPLOYED and FRINGEBENEFITS). These values show up as -1 for YES and 0 for NO.

Is there anyway to add code to mine that would allow me to change these values before they are sent to the Word template?

View 10 Replies View Related

Reports :: Filling Report Based On Specific Word Template

Jan 13, 2014

I was thinking today if it is possible to fill Access reports based on a specific Word template? I don't want to populate a Word file with Access data as users of my app might not all have Word. Or is there another solution using a WYSIWYG editor where users can format everything according to their needs? That would be fantastic.

View 2 Replies View Related

Word Merge..

Apr 27, 2006

Im having a problem getting this code to work.
It is meant to fire up Word (which it does), open up a new doc based on the template (which it also does) and then populate a field in the doc with data from the query table (which it doesn't).

I've put the fields in the Word doc via firstly, defining them as Custom Document Properties in the File, Properties box, and then as "{ DOCPROPERTY "<fieldname>" *MERGEFORMAT }" codes in the text.

The field in the Word doc is type 'text' and the field in Access is type 'text', so I am stumped by the "Type Mismatch" error it gives when attempting to get/open the recordset.
It hasnt even got to transferring the values across to the doc.?

Ive not done this before (Access newbie) and even found creating the custom fields in Word not as straighforward as I expected!

Please can someone help?


Private Sub butDocPreview_Click()

Dim dbs As Database
Dim objDocs As Object
Dim objWord As Object
Dim prps As Object
Dim rst As Recordset
Dim strClient As String
Dim strAccountManager As String

On Error Resume Next
Set objWord = GetObject(, "Word.Application")
If Err.Number = 429 Then
'Word is not running; creating a Word object
Set objWord = CreateObject("Word.Application")
Err.Clear
End If

On Error GoTo cmdWord_ClickError
DoCmd.SetWarnings False
'Open query..
DoCmd.OpenQuery "qryClientDocHdr_Export"
intCount = DCount("*", "tmpClientDocHdr")
Debug.Print "Number of Text items: " & intCount
' Check that there is at least one line..
If intCount < 1 Then
MsgBox "No text to process; cancelling"
Exit Sub
End If

Set dbs = CurrentDb
'==stops here with "Type Mismatch" error==
Set rst = dbs.OpenRecordset("tmpClientDocHdr", dbOpenDynaset)
With rst
strClient = Nz(![Client])
strAccountManager = Nz(![AccountManager])
End With
rst.Close
...
...
...

View 3 Replies View Related

Merge Data To Word

Jul 13, 2005

I am using merge in Word to import a calculation from an Access query. The query calculation displays to 2 decimal points by setting format and decimal places - no problem here. In the Word merge field, the calculation is displayed to about 15 decimal places. I only want two decimal places. Any ideas?

Thanks
John

View 1 Replies View Related

Word Mail Merge

Jul 8, 2005

I wonder if there is a way to link two tables or queries to a word doc for mail merge. I have an investigative memo and many findings associated with it. They all in Access for record keeping. Now I want to merge the main memo with all findings into a word document. The trick part is that the memo is also different so I cannot have a uniformed letter pre-defined in word. The content of memo is coming from Access too. I don't know if there is a way to do it or simply have two independent mail merges and combine two words doc in one (how?, hate to copy and paste).

Suggestions are appreciated.

Good day and night.

View 1 Replies View Related

Mail Merge With Access & Word

Aug 17, 2007

I want to use an Access Table for a mail merge but when i try to use the merge option I get a pop up asking for a password. I put in my administrator password for the database and it tells me I dont have acess to the database. It has something to do with the passwords i put on the database.


Anyone have any ideas to what I need to do to get this to work?

View 1 Replies View Related

Word Merge Print Options

Feb 9, 2006

I have the below code behind a button to merge and print into MSWord and it's working wonderfully. However, how can I modify it to print 1 copy of page one, TWO copies of page 2 and one copy of page 3?

_________________________________________
Private Sub Print_Reconsideration_Click()
Dim objWord As Word.Application
'Start Microsoft Word 2000.
Set objWord = CreateObject("Word.Application")

With objWord
'Make the application visible.
.Visible = False

'Open the document.
.Documents.Open ("G:PharmacyPrior Auth Docs and DataRevised Pharmacy Denial Processes
econsideration.doc")

'Move to each bookmark and insert text from the form.
.ActiveDocument.Bookmarks("bmkFirstName").Select
.Selection.Text = (CStr(Forms!frmDenial!MBRFirst))

.ActiveDocument.Bookmarks("bmkLastName").Select
.Selection.Text = (CStr(Forms!frmDenial!MBRLast))

.ActiveDocument.Bookmarks("bmkHRN").Select
.Selection.Text = (CStr(Forms!frmDenial!MemberNumber))

.ActiveDocument.Bookmarks("bmkAddress1").Select
.Selection.Text = (CStr(Forms!frmDenial!MBRAddress1))

.ActiveDocument.Bookmarks("bmkCity").Select
.Selection.Text = (CStr(Forms!frmDenial!MBRCity))

.ActiveDocument.Bookmarks("bmkState").Select
.Selection.Text = (CStr(Forms!frmDenial!MBRState))

.ActiveDocument.Bookmarks("bmkZip").Select
.Selection.Text = (CStr(Forms!frmDenial!ZipCode))

.ActiveDocument.Bookmarks("bmkDrug").Select
.Selection.Text = (CStr(Forms!frmDenial!DrugName2))

.ActiveDocument.Bookmarks("bmkStrength").Select
.Selection.Text = (CStr(Forms!frmDenial!Strength))

.ActiveDocument.Bookmarks("bmkDate").Select
.Selection.Text = (CStr(Forms!frmDenial!DateReceivedbyPlan))

.ActiveDocument.Bookmarks("bmkDate2").Select
.Selection.Text = (CStr(Forms!frmDenial!DateReceivedbyPlan))

.ActiveDocument.Bookmarks("bmkMDFirst").Select
.Selection.Text = (CStr(Forms!frmDenial!MDNameFirst))

.ActiveDocument.Bookmarks("bmkMDLast").Select
.Selection.Text = (CStr(Forms!frmDenial!MDLastName2))

.ActiveDocument.Bookmarks("bmkMDCred").Select
.Selection.Text = (CStr(Forms!frmDenial!Credential))

.ActiveDocument.Bookmarks("bmkFirstName2").Select
.Selection.Text = (CStr(Forms!frmDenial!MBRFirst))

.ActiveDocument.Bookmarks("bmkLastName2").Select
.Selection.Text = (CStr(Forms!frmDenial!MBRLast))

.ActiveDocument.Bookmarks("bmkMDFirst2").Select
.Selection.Text = (CStr(Forms!frmDenial!MDNameFirst))

.ActiveDocument.Bookmarks("bmkMDLast2").Select
.Selection.Text = (CStr(Forms!frmDenial!MDLastName2))

.ActiveDocument.Bookmarks("bmkMDCred2").Select
.Selection.Text = (CStr(Forms!frmDenial!Credential))

.ActiveDocument.Bookmarks("bmkFirstName3").Select
.Selection.Text = (CStr(Forms!frmDenial!MBRFirst))

.ActiveDocument.Bookmarks("bmkLastName3").Select
.Selection.Text = (CStr(Forms!frmDenial!MBRLast))

.ActiveDocument.Bookmarks("bmkAddress11").Select
.Selection.Text = (CStr(Forms!frmDenial!MBRAddress1))

.ActiveDocument.Bookmarks("bmkCity2").Select
.Selection.Text = (CStr(Forms!frmDenial!MBRCity))

.ActiveDocument.Bookmarks("bmkState2").Select
.Selection.Text = (CStr(Forms!frmDenial!MBRState))

.ActiveDocument.Bookmarks("bmkZip2").Select
.Selection.Text = (CStr(Forms!frmDenial!ZipCode))

.ActiveDocument.Bookmarks("bmkMDAddress1").Select
.Selection.Text = (CStr(Forms!frmDenial!MDAddress1))

.ActiveDocument.Bookmarks("bmkMDCity").Select
.Selection.Text = (CStr(Forms!frmDenial!MDCity))

.ActiveDocument.Bookmarks("bmkMDState").Select
.Selection.Text = (CStr(Forms!frmDenial!MDState))

.ActiveDocument.Bookmarks("bmkMDZip").Select
.Selection.Text = (CStr(Forms!frmDenial!MDZip))
End With

Print_Reconsideration_Err:
'If a field on the form is empty, remove the bookmark text, and
'continue.
If Err.Number = 94 Then
objWord.Selection.Text = ""
Resume Next

End If
objWord.Application.Options.PrintBackground = False
objWord.Application.ActiveDocument.PrintOut
ActiveDocument.Close wdDoNotSaveChanges
End Sub

View 2 Replies View Related

General :: Merge With Word Docs

Apr 4, 2013

I have a access database with 125 names and addresses and need to merge and send out the a doc for each one. Does anyone have experience with the multiple factor of this process. I can merge one but then have to repeat several times.

View 5 Replies View Related

Mail Merge From Access To Word?

Feb 18, 2015

I am preparing a Word document for a mail shot, and need to import data from my access file. I am trying to build a formula that will take a field from the Access file and, if it is true, print some data.

So far, I have =IF(Schedule 2014=40,full page). Schedule 2014 is a column in the query I am using in this mail merge, 40 is an amount of money in that column and full page is the text that should appear in the Word document. The result I am getting is!Syntax Error, 2014 .

The remainder of the information I am merging is working well. I am asking for the 40 to appear in the relevant recipient's letter which is fine, but I want it to print full page before it (or half page for 30, or quarter page for 20)

View 1 Replies View Related

Mail Merge To Word 2003 Issues

Oct 11, 2005

I have produced a A2k db for distribution to others. Part of the db is a function that links to some word docs via hyperlinks. The word docs have been set up as mail merge docs to a table in the db.

When used in Office 2000 this function is faultless but when installed on a computer running Office 2003 they sometimes get a problem when they open the doc in that the mail merge toolbar is greyed out. It seems as if the doc can't find the db. Has anyone else experienced this problem and know of any fix that can be applied.

I have searched the MS Knowledge base and this forum to no avail, although the MS KB did have references to similar problems (not a direct comparison of the problem) that required a service pack download to fix.

Before I tell someone to download a service pack I need to eliminate any other problem that may be causing it.

Thanks :confused:

View 2 Replies View Related

Can I Mail Merge Word 97 With Access 2003?

Aug 22, 2006

I am wanting to do away with access 97 on a few computers here at work but we cant afford to buy everyone office 2003. Before I buy us access 2003 for a computer I need to know if word 97 will do a mail merge with access 2003. Or could I just buy Office 2003 package for the few computers and it will work that way for a bit more money. I think there would be a compatability issue...

View 3 Replies View Related

Merge Access 2003 To Word 2002

Dec 13, 2006

Hi

I have written an application which uses a query for the current record and then opens a Word document, merges this record and shows the merged document for the user.

all works fine using Office 2003 - when i try it on a pc with Office 2002 - it diesn't work. Something is happening - WINWORD.EXE is running on the process list. But the document doesn't open. I have added the Microsoft Office 10 Office Library to the references but still no joy.

It's a killer - all testing was done on Office 2003 and now a key user wants to use the app - on 2002 and it doesn't work

Any ideas?

cheers

View 1 Replies View Related

Changing The Way Data Is Displayed (for A Merge To MS Word)

Sep 23, 2004

Hi,

I am new to Access. I am a speech therapist and am building a database to keep up with my student's progress. I have set up the database satisfactorily (if rudimentarily, at this point), but am now trying to merge the data to a form on a MS word document that we use to file medicaid. Most of my tables and queries have one to many relationships because each student has several goals and in each therapy session we usually work on more than goal. On the medicaid form the information is organized by date. The only way I can envision to get the data to merge to the medicaid form is to use as the source a table or query where there is a single record for each date. But all the tables and queries I have figured out to build so far have multiple records with the same date, if we worked on more than goal in that session. (i.e. there is one record per each separate goal). For example, if you are visual like me.......

This is what I've got:

[date 1] [goal 1] [percentage for goal 1]
[date 1] [goal 2] [percentage for goal 2]
[date 1] [goal 3] [percentage for goal 3]

but this is what I need:

[date 1] [goal 1] [percentage for goal 1] [goal 2] [percentage for goal 2] [goal 3] [percentage for goal 3]

Is there any way to run a query that will reorganize the data in this way? I thought for a minute that a crosstab query would do it, but I don't need to perform a calculation, I just need to reorganize the way the data is displayed. .....perhaps something with a pivotform??? I haven't figured those out yet.

Thanks for any help.

Shan

View 2 Replies View Related

Some Advide - Access To Word Mail Merge

Nov 24, 2006

I have done several mail merges where you open Microsoft Word, select your data (inthis case a query from access) and them use mail merge to create the documents.

However, i need to do it the other way. I have a project in access where the user will be in access and need to do a mail merge to word, so i want the data to be sent from access to word while they are still in access, if that makes sense.

If there are any good turorials that ppl know about or what i could be looking for in order to achieve this then i would be very grateful to all who reply!!

Thanks

View 3 Replies View Related

General :: Image Merge To Word From Access?

Aug 15, 2015

I have an intermediate level experience in access.I am a private investigator and have created a beautiful access database to manage my case intakes, case progress, investigators, clients 8nvoices, expenses and a whole much more for my business.

I have integrated word merge in my database to generate final reports etc.

how can i merge an image that is attached to a record to word?

Basically i create a new case and input all pertinate information for that specific case and in that case I add an image of the subject, google maps for the residence and other images such as facebook screenshots etc.. and what i want to do is when I merge the case with word to also have a page in word to include this images.

View 8 Replies View Related

Generate Merge Between Access And Word 2007

Aug 16, 2012

I am trying to create a button which will merge data from specific fields from the active record in my impounded dog table/form into a pre-existing word template. I have the table & form set but am only trying to merge a few of the fields in the table. Things like the Impound ID (Primary Key), Time, Date, & Location of Seizure, Dog Breed, Colour, Markings, Age, Sex, & Collar.How would I put this in a macro or is it even possible to fit in a macro?

View 1 Replies View Related







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