One report from multiple tables

josephbupe

Registered User.
Local time
Today, 22:11
Joined
Jan 31, 2008
Messages
247
I have three tables for one report:

1. tblSuspects =IndexNo (particulars)
2. tblInventory =ItemID (Picture)
3. tblOffences =OffenceID (offences)

I would like to create a single report to print paticular, picture and offences. How can i do this, please?
 
I assume you have the tblInventory and tblOffences linked to tblSuspects in the database relationships.

You would load a report from another form, using the Where Condition ="[ID]="&tblSuspects[ID]

You make sure that the report has the tblSuspects.ID as the first field in the report datasource.

Then you can load any other information you need into the form that will be relative to that suspect's ID, by adding it to the datasource. ie: offences.

There are loads of examples out there.

If you can't find one, let me know and I'll try and find a minute or so to put one together.
 
DanWall.

Thank you so much, but i think i need and actual example. I don't seem to find the correct sample right now.
 
My problem is viewing a report from three tables, but only for one record at a time.

1. tblSuspects (IndexNo)
2. tblInventory (ItemID)
3. tblOffences (OffenceID)

Tables 2 and 3 are linked to table 1, both in query and table relationship.
All i now need is to the preview the record currently in view on he form, but the on-click button code i have isn't working for me:

Private Sub cmdPrintPreview_Click()
On Error GoTo Err_cmdPrintPreview_Click
Dim stDocName As String
stLinkCriteria = "[IndexNo]=" & Me![ItemID]
stDocName = "rptReport"
DoCmd.OpenReport stDocName, acPreview
Exit_cmdPrintPreview_Click:
Exit Sub
Err_cmdPrintPreview_Click:
MsgBox Err.Description
Resume Exit_cmdPrintPreview_Click

End Sub

:confused::mad::(
 

Attachments

Last edited:

Users who are viewing this thread

Back
Top Bottom