Hi,
Let us assume you create a table called letters. Let this have the following fields:
name Text
address Text
Zip Text
Type Text
Design a form that has 4 text boxes with labels Name, Address,Zip and Type respectively.
Add a command button called addRecord and change its caption to Add.
Set a refernce to the DAO library using the refernces option on the tool bar.
In the On Click event of the command button, type in the following code:
Private Sub addRecord_Click()
Dim db as database
Dim rs as recordset
set db=currentdb
set rs=db.openrecordset("letters",dbopendynaset)
rs.addnew
rs.fields("name"

=Me.Text1 'Text box for name
rs.fields("address"

=Me.Text2 'Text box for address
rs.fields("Zip"

=Me.Text3 'Text box for Zip
rs.fields("type"

=Me.Text4 'Text box for Type
rs.update
rs.close
db.close
set rs=nothing
set db=nothing
End Sub
This is the code for adding records to a table.
Now, for printing a set of letters based on the type, follow the steps below:
Query Creation:
--------------
i) Create a query called reportQuery in the Query Design window.
ii) In that query select the fields as individual fields instead of using the letters.* option.
iii) Save the query using the name above.
Modifications to form to allow printing :
----------------------------------------
iv) Add a command button to the existing form and name it as cmdPrintReport and set its caption to Print Report.
v) Add a text box called Text5 to the form.
Creation of the report :
-----------------------
vi) Open a new report in the design view.
vii) Set the Record Source property of the report to reportQuery. ( the query we created now ).
viii) Add three text boxes to the detail section of the report.
ix) Set the Control Source property ( available under the Data Tab of the properties box ) of the first text box to name.
x) Set the Control Source property ( available under the Data Tab of the properties box ) of the second text box to address.
xi) Set the Control Source property ( available under the Data Tab of the properties box ) of the third text box to zip.
xii) Save the report under the name rptLetters.
Now that we have finished the designing processes, put the following code in the click event of the cmdPrintReport button that we have just added to the form:
Private Sub cmdPrintReport_Click()
dim qd as querydef
set qd=currentdb.querydefs("reportQuery"

qd.SQL="Select * from letters where type='" & Me.Text5 & "'"
qd.close
Docmd.openreport "rptLetters",acViewPreview
End Sub
Using the acViewPreview option int eh above stmt. ensures that you get to see the preview of the report. If you omit this it will print to the default printer.
Hope this helps you. Please let us know what happens.