run-time error 2455 "Invalid reference to property Form/Report"

  • Thread starter Thread starter Bill R via AccessMonster.com
  • Start date Start date
B

Bill R via AccessMonster.com

I have the following code in a report module:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me!srRemarks.Visible = Me!srRemarks.Report.HasData
Me!srDates.Visible = Me!srDates.Report.HasData
Me!srEngineers.Visible = Me!srEngineers.Report.HasData
End Sub

This used to work like a charm a couple of months ago when I last visited the
report. Now I get the subject error.

All of a sudden Me!srRemarks.Report.HasData generates an error. Any
suggestions would be appreciated.

Thanks,

Bill
 
Do you realize that if a subreport doesn't have data, it won't appear even
if you want it to? I doubt you need any code to do this.
 
Back
Top