Filter on Report

coolcatkelso

Registered User.
Local time
Today, 17:04
Joined
Jan 5, 2009
Messages
279
Hiya
I have a form with 2 buttons on it.. Preview Report and Print Report

whichever one I click, it shows all the reports, not the record the form is currently on.

What would the filter be and where do I put it lol?

The keyfield would be LetterID which is place on both the Form and Report

Cheers
________
OLD MAN TARTS
 
Last edited:
Docmd.OpenReport(ReportName, View, FilterName, WhereCondition, WindowMode, OpenArgs)

WhereCondition:

To open a report and restrict its records to those specified by the value of a control on a form, use the following expression:
[fieldname] = Forms![formname]![controlname on form]
 
I used the code below for my database, and I get a compile error. What am I doing wrong?

Code:
[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3][/SIZE][/FONT] 
[FONT=Times New Roman][SIZE=3]DoCmd.OpenReport (rptMemo,acViewPreview,,[fldTaskNumber] = Forms![frmMain]![fldTaskNumber],,)[/SIZE][/FONT]
 

Users who are viewing this thread

Back
Top Bottom