UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Iif Statement In Report, Access 2013    
 
   
hankfromca
post Nov 29 2019, 06:49 AM
Post#1



Posts: 4
Joined: 24-November 19



Hi There, I am not really sure of the best way to do this, but I have a report that is displaying unwanted data in a field. The field on the report is

[color2]

it is displaying a value of #Func! on the report.

I just want it so that anytime #Func! appears it does not display anything. The field [color2] is controlled in query with the following:

Color2: Left([Color1],InStr([Color1]," ")-1)

I believe that the data in question does not have a value for this for this field so I think it is generating the result of #func!... I am not sure where to control it so nothing displays when there is no data for the field. I thought maybe address it in the report as the expression is complicated for me, but I have no idea.

Any ideas on the best way to approach this is greatly appreciated. Thanks so much. Hank
Go to the top of the page
 
cheekybuddha
post Nov 29 2019, 07:02 AM
Post#2


UtterAccess Moderator
Posts: 11,896
Joined: 6-December 03
From: Telegraph Hill


welcome2UA.gif

There might be a better way to do this, but a quick solution might be:
CODE
Color2: IIf(InStr(Nz([Color1], "")," "), Left([Color1],InStr([Color1]," ")-1), "")


hth,

d

--------------------


Regards,

David Marten
Go to the top of the page
 
hankfromca
post Nov 29 2019, 01:12 PM
Post#3



Posts: 4
Joined: 24-November 19



Hi David Marten, That works just perfectly... Thank You.. Hank
Go to the top of the page
 
cheekybuddha
post Nov 29 2019, 07:27 PM
Post#4


UtterAccess Moderator
Posts: 11,896
Joined: 6-December 03
From: Telegraph Hill


Hank,

yw.gif

--------------------


Regards,

David Marten
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    10th December 2019 - 08:33 AM