Report shows blank with no data (1 Viewer)

Neo003

New member
Local time
Today, 01:39
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.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 14:39
Joined
May 7, 2009
Messages
19,226
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
 

Neo003

New member
Local time
Today, 01:39
Joined
Dec 18, 2021
Messages
19
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.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 14:39
Joined
May 7, 2009
Messages
19,226
if you can upload a sample db, it will help and will make solve your problem faster.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 14:39
Joined
May 7, 2009
Messages
19,226
you don't have lbl_Todaysdate in your form, so i change it to TodaysDate only in your query.
 

Attachments

  • LT.zip
    285.8 KB · Views: 101

Users who are viewing this thread

Top Bottom