#ERROR

  • Thread starter Thread starter Bill B
  • Start date Start date
B

Bill B

Hi All

I'm getting the #ERROR from the iif statement below

Control Source: =IIf([test_typ]="IMPA",IIf(Trim([shape])>0,[shape]," ")," ")

[shape] is a four character string value from the database. It's attributes
are a "text field" wtih a name of "Text133"

Database attributes are:

Field Size: 4
Required: No
Allow Zero Length: Yes
Indexed: No
Unicode Compression: No
IME Mode: No Control
IME Sentance Mode: None

If the field happens to be empty then the IIf false condition is returned
and a blank space is displayed. The only time the error is displayed is when
the [shape] variable is called.

Bill
 
Perhaps the following will work for you.

Control Source: =IIf([test_typ]="IMPA",IIf(Len(Trim([shape] &
""))>0,[shape]," ")," ")

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
:-(

no joy. It's really got me baffled.

if I remove everything and just leave [shape] in this "Control Source" field
then the 4 character contents is displayed. The minute I try to run any kind
of condition on it I get errors.

Bill


John Spencer said:
Perhaps the following will work for you.

Control Source: =IIf([test_typ]="IMPA",IIf(Len(Trim([shape] &
""))>0,[shape]," ")," ")

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
.

Bill B said:
Hi All

I'm getting the #ERROR from the iif statement below

Control Source: =IIf([test_typ]="IMPA",IIf(Trim([shape])>0,[shape]," "),"
")

[shape] is a four character string value from the database. It's
attributes are a "text field" wtih a name of "Text133"

Database attributes are:

Field Size: 4
Required: No
Allow Zero Length: Yes
Indexed: No
Unicode Compression: No
IME Mode: No Control
IME Sentance Mode: None

If the field happens to be empty then the IIf false condition is returned
and a blank space is displayed. The only time the error is displayed is
when the [shape] variable is called.

Bill
 
Make sure the name of the control is not the name of a field in your record
source. Then maybe try a control source of:
=IIf([test_typ]="IMPA" AND Len(Trim([shape] & ""))>0,[shape]," ")

--
Duane Hookom
Microsoft Access MVP


Bill B said:
:-(

no joy. It's really got me baffled.

if I remove everything and just leave [shape] in this "Control Source" field
then the 4 character contents is displayed. The minute I try to run any kind
of condition on it I get errors.

Bill


John Spencer said:
Perhaps the following will work for you.

Control Source: =IIf([test_typ]="IMPA",IIf(Len(Trim([shape] &
""))>0,[shape]," ")," ")

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
.

Bill B said:
Hi All

I'm getting the #ERROR from the iif statement below

Control Source: =IIf([test_typ]="IMPA",IIf(Trim([shape])>0,[shape]," "),"
")

[shape] is a four character string value from the database. It's
attributes are a "text field" wtih a name of "Text133"

Database attributes are:

Field Size: 4
Required: No
Allow Zero Length: Yes
Indexed: No
Unicode Compression: No
IME Mode: No Control
IME Sentance Mode: None

If the field happens to be empty then the IIf false condition is returned
and a blank space is displayed. The only time the error is displayed is
when the [shape] variable is called.

Bill
 
Back
Top