Open report on a specific record

mafhobb

Registered User.
Local time
Yesterday, 23:56
Joined
Feb 28, 2006
Messages
1,249
I have a form with a subform that opens in a specific record using this:
Code:
Private Sub Form_Load()
Dim CallIDVar As Integer
Dim rs As Object

CallIDVar = Forms![contacts]![Call Listing Subform].Form![CallID]

Set rs = Me.Recordset.Clone
    rs.FindFirst "[CallID] = " & CallIDVar
    If rs.NoMatch Then
        rs.AddNew
        rs![CallID] = CallIDVar
        rs.Update
        Me.Requery
        rs.FindFirst "[CallID]=" & CallIDVar
        Me.Bookmark = rs.Bookmark
    Else
        Me.Bookmark = rs.Bookmark
    End If

    Set rs = Nothing

End Sub

I have now created a report (rptEstfrm) which contains a report and subreport (same as form above) and needs to display the same info as the form, thus it need to show the same record.

How can I open the report on that same record?

mafhob
 
That worked. Thanks!

mafhobb
 

Users who are viewing this thread

Back
Top Bottom