Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to have 2 different records in one report

Status
Not open for further replies.

stephanr

Technical User
Jun 8, 2005
3
US
I want to create an envelope which has the recipients and the senders address on it. The recipients address is the record itself in the database and the senders address is a field with the record number in the same table.

Basically I need a report with two different records in it which are in the same table.

I am new to VB and don’t want to reinvent the wheel…
 
Use a query with a self join as RecordSource.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
You mean I can just write and SQL command that takes care of it???
Do you have an example?
Like I said I am new in Access.
 
A starting point:
SELECT Sender.Name, Sender.Address, Recipient.Name, Recipient.Address
FROM yourTable AS Recipient INNER JOIN yourTable AS Sender
ON Recipient.SenderKey = Sender.PrimaryKey

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks that is not as hard as I thought it would be.
Now I still have the problem of actually getting the content in my word document.
I figured out how to create a word document and how to change/add content from VBA.
How do I access the database and run the SQL statement from VB? Is there an easy way to do it with ODBC?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top