Create a report base on the result of a filter (in a form)

nianko

Registered User.
Local time
Today, 02:31
Joined
Aug 17, 2010
Messages
21
Hi Forum,

I have a select query, a form with a combo box (based on the select query) and a report (also based on the same query).
When I select the name of an investor in my form through the cbo, the latest securities bought by this investors are displayed. I would like ot be able to print the result of this filter so I created a report with the following [event procedure]:

Code:
Private Sub Report_Open(Cancel As Integer)
Me.RecordSource = frmLookUpByInvestors.RecordSource
End Sub

But I have an error:

Run time error 424
Object required

What is the problem :confused:

Thanks
 
Missing the reference to the Forms collection.

Me.RecordSource = Forms!frmLookUpByInvestors.RecordSource

However you would also need to transfer the filter information to the report.
 
Thanks ! It works now
 

Users who are viewing this thread

Back
Top Bottom