Again my first two reports in Access 2016. I was trying to insert into the page header the name of the report and the date.
I just inserted into the page header the following code:
Option Compare Database
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
If Me.Page = 1 Then ' no need to do it more than once
Me.Caption = "Road Improvements Test for Wrong Rates " & Me![txtformatdate]
End If
End Sub
Private Sub Report_NoData(Cancel As Integer)
MsgBox "Current Week's tables are empty "
Cancel = True
End Sub
It compares regular hourly rates to prevailing wage rates. However, there is not always overtime, so I have zero fields, because it is easier to overlook.
I get the following error message:
This form or report contains changes that are incompatible with the current database format. The form or report was not saved. In order to save your changes, you must remove any layouts that have empty cells in them and/or set the HasModule property for the form or report to no.
There is no module, it is just this report opens from a form with the correct name and date inserted. Have not had problems with any other report. I set he HasModule to no, but it ignores my code, no it actually wipes it out.
I don't understand what is incompatible with the database format, I really do not have empty fields in the detail, only code like" =IIf([othrs]=0,"",[OTRate])
I have plenty of report with the same code and lots of real empty fields create in Access 2003 and 2010 without any problems.