View Full Version : Help!


Kevin Field
06-09-2010, 05:39 AM
Is have a two fields which take thier value from a table.

The first is [ClientID]
The second is [Joint Owner ID]

Basically, on my report i want to do the following.

If [Joint Owner ID] has a value then i want it to show "Joint"
If [Joint Owner ID] doesnt have a value then i want it to show "Client"
If neither of the fields contain any data i want the box to be empty.

I currently have this code:

=IIf([Joint Owner ID] Is Not Null,"Joint") Or IIf([Joint Owner ID] Is Null,"") Or IIf([Joint Owner ID] & [ClientID] Is Null,"")

I know this is wrong. Can someone help? Ive been racking my brain for hours and hours.

namliam
06-09-2010, 05:46 AM
=IIF ( ClientID is null, "", IIf([Joint Owner ID] Is Null,"Client", "Joint") )

That what your looking for?

Kevin Field
06-09-2010, 05:54 AM
Close, however i only want the box to show a "" empty string when both the clientID and the Joint Owner ID are null.

namliam
06-09-2010, 05:59 AM
So remove the client...
=IIF ( ClientID is null, "", IIf([Joint Owner ID] Is Null,"", "Joint") )

However if ClientID is empty, its likely impossible to have a joint owner so perhaps just:
=IIf([Joint Owner ID] Is Null,"", "Joint")

Will work?

Kevin Field
06-09-2010, 06:05 AM
Done and dusted. Thank you so much!!!