Question : Skip a detail row in an access 2007 report

I need to skip a detail row in an Access report when one of the detail values is null. I can't change the query that feeds the report to eliminate the null rows for reasons I won't go into here.

I saw this solution in another post:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    If Me.MyID = 1 Then Cancel = True
End Sub

I added this to the report code, but it does not seem to get called. I even changed to condition to if 1=1 then cancel = true, but it still did not work.

Answer : Skip a detail row in an access 2007 report

I discovered that the potential solution I mentioned in the question was actually working. The null rows show up in the report view but do not show up when printed.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    If Me.MyID = 1 Then Cancel = True
End Sub

Thanks
Random Solutions  
 
programming4us programming4us