how do i auto generate a letter from access database

H

Higgie

I have my clients in an access database. I would like to configure a
"button" on the form into which I enter client data that would automatically
generate a letter for that client record.

Any help greatly appreciated.
 
A

Arvin Meyer

Create the letter as an Access report and use a button to open it as a
single record. The line of code to open the report would be something like:

DoCmd.OpenReport "The Letter" , , , , "ClientID =" & Me.txtClientID

Where "The Letter" is you report and txtClientID is the text box which holds
the ClientID value on your form.

Or if you're feeling frisky, you can write the letter in Word and use
automation to fill the data. Have a look at this code on my website:

http://www.datastrat.com/Code/WordMerge.txt
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access
 
H

Higgie

Arvin Meyer said:
Create the letter as an Access report and use a button to open it as a
single record. The line of code to open the report would be something like:

DoCmd.OpenReport "The Letter" , , , , "ClientID =" & Me.txtClientID

Where "The Letter" is you report and txtClientID is the text box which holds
the ClientID value on your form.

Or if you're feeling frisky, you can write the letter in Word and use
automation to fill the data. Have a look at this code on my website:

http://www.datastrat.com/Code/WordMerge.txt
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access




Thank you Marvin! I'll give it a shot.
 
Top