This code in the onformat of a report header previously worked fine in A2K but 2010 throws an error message if the date field in the form is empty.
If IsNull(Forms![FrmAccounts]![TxtStartDate]) Or Forms![FrmAccounts]![TxtStartDate] = "" Then
Me.LblHeader.Caption = "Order Data"
Else
Me.LblHeader.Caption = "Order Data for " & Forms![FrmAccounts]![TxtStartDate]
End If
Error message reads
“Run-time error 91
Object variable or with block variable not set”
Anyone know why this should be
If IsNull(Forms![FrmAccounts]![TxtStartDate]) Or Forms![FrmAccounts]![TxtStartDate] = "" Then
Me.LblHeader.Caption = "Order Data"
Else
Me.LblHeader.Caption = "Order Data for " & Forms![FrmAccounts]![TxtStartDate]
End If
Error message reads
“Run-time error 91
Object variable or with block variable not set”
Anyone know why this should be