If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
#ERROR
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 a 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 |
#2
|
|||
|
|||
#ERROR
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" wrote in message ... 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 a 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 |
#3
|
|||
|
|||
#ERROR
:-(
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" wrote in message ... 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" wrote in message ... 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 a 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 |
#4
|
|||
|
|||
#ERROR
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" wrote: :-( 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" wrote in message ... 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" wrote in message ... 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 a 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 |
#5
|
|||
|
|||
#ERROR Answer
shape is a reserved word. http://allenbrowne.com/Ap****ueBadWord.html
#2073 and is a Report property I changed the name to shape1 and it runs like a charm. Thank you Bill "Bill B" wrote in message ... 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 a 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 |
Thread Tools | |
Display Modes | |
|
|