View Full Version : Expression has no value error


ViRi
11-19-2006, 06:14 AM
Hi

I have a report and I am trying to reference a text box in the Report called Currency but I always get the Expression has no value error.

Here is two codes I've tried by putting them on the Open Event of the Report

[CODE]
If Reports!rptStatement!Currency = "GBP" Then
Me.Debit.Format = "£0.00"
ElseIf Reports!rptStatement!Currency = "EUR" Then
Me.Debit.Format = "€0.00"
Else
Me.Debit.Format = "$0.00"
End If
[\CODE]


Or

[CODE]
Select Case Nz(Me.Currency, "")
Case "GBP"
Me.Debit.Format = "£0.00"
Case "EUR"
Me.Debit.Format = "€0.00"
Case Else
Me.Debit = "$0.00"
End Select
[\CODE]

They both generate the same error You entered an expression that has no value

ViRi

ViRi
11-19-2006, 06:32 AM
I Have the solution. Code must be placed on the On Page Event of the Report not the On Open event.

ViRi