Individual records exported to word mail merge? (1 Viewer)

ddiver

Registered User.
Local time
Today, 15:55
Joined
Feb 23, 2005
Messages
28
Hi I wonder if anyone can help? I have looked through prevous posts and cant find any answers that fit what I need to do. For reference I am using Access 97 and Word 97.

I want to be able to have a client record open in a form and click a button and for that particular record to merge with a preformatted word doc. I have created a query that gives me all the fields I need (as they are over multiple tables) and I can successfully combine this into a mail merge. But it currently takes *all* the records and I want it to only do the current one. I also want user to be able to click a button somewhere on the form that automates this process for him. Is this possible?

I have investigated transfertext and filled in what I think I should have but it seems to do nothing. It creates another (unopenable) file in the same folder as the word doc and does nothing else. But I am using the 'export word for windows merge' in the tranfertext action?

If I can only crack this I will be happy! Many thanks in advance for any help

DD
 

Bat17

Registered User.
Local time
Today, 15:55
Joined
Sep 24, 2004
Messages
1,687
For the Query bit add a criteria to the query thats linked to an identifier on the form. Usualy a record ID of some sort. You can use the builder in the query grid for this.

Peter
 

ddiver

Registered User.
Local time
Today, 15:55
Joined
Feb 23, 2005
Messages
28
HI thanks for the reply. Forgot to mention that I had already done this and the query selects the particular record correctly. But when I then try and open the query through mail merge it prompts me for the identifier (in this case 'client ID') and when it is not entered cannot open the mail merge. I dont want user to be having to put in client ID. And also not to have to go into word to run the mail merge.

Cheers
DD
 

Bat17

Registered User.
Local time
Today, 15:55
Joined
Sep 24, 2004
Messages
1,687
To get the query to work create a function that looks at the form for the vale and use the function in the query.
Function GetID()
GetID = Forms![YourForm]![YourField]
End Function

then use GetID() as the criteria in the query. You may want to add more functionality to the function though to set up default values if the form is not open.

You can use the shell command or Automation to open Word by remote. I have not used Word Mailmerge but I think it should work OK.

Peter
 

Users who are viewing this thread

Top Bottom