Expression has no value error

ViRi

Registered User.
Local time
Today, 10:40
Joined
Jan 31, 2006
Messages
44
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
 
I Have the solution. Code must be placed on the On Page Event of the Report not the On Open event.

ViRi
 

Users who are viewing this thread

Back
Top Bottom