Report shows blank with no data

Neo003

New member
Local time
Today, 12:12
Joined
Dec 18, 2021
Messages
19
I am having this problem,

If I click to open a report from a form, no data. But if I open the report directly it shows perfectly.
 
do you have YesterdayDate in your form?
how do you compute the value, like:

=DateDiff("d", -1, [tbl_TodaysDate])

you can also SetParameter you variables before Opening the Report:

With Docmd
.SetParameter "[Form]![frm_Report]!YesterdaysDate", me!YesterdayDate
.SetParameter "[Form]![frm_Report]!tbl_TodaysDate", me!tbl_TodaysDate
.OpenReport "yourReportName"
End With
 
On form I've hidden yesterdaysdate with "=[TodaysDate]-1".

and on the report it's only
Code:
DoCmd.OpenReport "rpt_DailySalesAmount", acViewReport
DoCmd.Maximize

As I said if I open the report directly and enter the dates manually it's shows fine, also I use the same form to open another report which doesn't have any problem opening and showing data. I checked, they are almost identical.
 
if you can upload a sample db, it will help and will make solve your problem faster.
 
you don't have lbl_Todaysdate in your form, so i change it to TodaysDate only in your query.
 

Attachments

Users who are viewing this thread

Back
Top Bottom