Envelopes in Access

C

Cassandra

I have created a report to reflect a #10 envelope. Now I want to create a
command button that allows me when clicked print an individual envelop that
reflects the information of the member record that I am in, so far no such
luck. How do I correct this?
 
D

Damon Heron

On your form add a command button with the following code (substituting your
info, of course):

Private Sub cmdPrtEnv_Click()
On Error GoTo Err_cmdPrtEnv_Click
Dim stDocName As String

stDocName = "Envelope Printing" 'Enter the name of your report....
DoCmd.OpenReport stDocName, acPreview, , "[ClientID] =
Forms![Projects].form![txtClientID]"
' substitute your formname and controls for client ID.
Exit_cmdPrtEnv_Click:
Exit Sub

Err_cmdPrtEnv_Click:
MsgBox Err.Description
Resume Exit_cmdPrtEnv_Click

End Sub

Damon
 
C

Cassandra

Thank you. I really appreciate your help.

Damon Heron said:
On your form add a command button with the following code (substituting your
info, of course):

Private Sub cmdPrtEnv_Click()
On Error GoTo Err_cmdPrtEnv_Click
Dim stDocName As String

stDocName = "Envelope Printing" 'Enter the name of your report....
DoCmd.OpenReport stDocName, acPreview, , "[ClientID] =
Forms![Projects].form![txtClientID]"
' substitute your formname and controls for client ID.
Exit_cmdPrtEnv_Click:
Exit Sub

Err_cmdPrtEnv_Click:
MsgBox Err.Description
Resume Exit_cmdPrtEnv_Click

End Sub

Damon


Cassandra said:
I have created a report to reflect a #10 envelope. Now I want to create a
command button that allows me when clicked print an individual envelop
that
reflects the information of the member record that I am in, so far no such
luck. How do I correct this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top