recordset from subform to be sent to a report via button

S

Slappy

I can't seem to get this working...

I have a form with a subform. The main form has the client's name and file
number.

The subform has particulars for various persons I need to send letters to on
behalf of the client (i.e. name, address etc.).

I've put a button on the subform that appears with each recordset in the
subform. The button is programmed to open up a report. The report is
actually a standard letter with fields to be populated by information on the
main form (i.e. the client's name and file number) and also information from
the particular recordset on the subform.

In other words....let's say the main form shows client #1 (John Smith, file
number 2025). The subform is a continuous form showing the names and
addresses of all of John Smith's 5 doctors. If I want to send a letter to
doctor number 3, Dr. C, I click the button on number 3 on the subform and up
should come a report showing the following: "Re: John Smith, file number
2025. Dear Dr. C., Please send me all of your records for John Smith."

Thanks for any assistance.
 
A

Allen Browne

The subform is bound to a table that should have a primary key field. You
can use the primary key value to limit the report to just that one value.

Here's an example:
Print the record in the form
at:
http://allenbrowne.com/casu-15.html

You will need to adapt that so it refers to the subform, but the principle
is the same.
 

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