How to show the value of criteria on query to report

moi

Member
Local time
Today, 09:51
Joined
Jan 10, 2024
Messages
273
Dear All,

Can somebody help me how to show my criteria on to my report header..

I based my report on a query and fill the criteria (StartDate) and (EndDate) to "PDate" control from a form where i open my report..

I would like to display the value of the StartDate and EndDate to my report.. I tried to create a 2 textboxes and put an expression "=StartDate and =EndDate, but it displays no value (empty box)..

Thank you for any help..
 
Oneway: keep form open and textbox expression references control on form.
=Forms!formname!textboxname
 
Last edited:
DoCmd.OpenReport ReportName, View, FilterName, WhereCondition, WindowMode, OpenArgs

You can use the OpenArgs argument to pass specific information to the report. Passing is then something very different from the point where the report itself should fetch the information it needs, and thus has a touch of object-oriented programming.
 
Can you please post the SQL statement for your query? Thanks.
 
Dear All,

Can somebody help me how to show my criteria on to my report header..

I based my report on a query and fill the criteria (StartDate) and (EndDate) to "PDate" control from a form where i open my report..

I would like to display the value of the StartDate and EndDate to my report.. I tried to create a 2 textboxes and put an expression "=StartDate and =EndDate, but it displays no value (empty box)..

Thank you for any help..
The report textboxes must refer to the form textboxes values. Their controlsource property must be:
=Forms!FORMNAME!StartDate and =Forms!FORMNAME!EndDate
(Change FORMNAME with the name of your form.)
 

Users who are viewing this thread

Back
Top Bottom