Access 2003

B

beebobs

I have added the first fine I wanting to bring the MO ENGINEERING, form my
query the MO Material field was null.. this works fine

MO: IIf(IsNull([MO MATERIAL]) & " " & [MO MATERIAL],[MO ENGINEERING])

Now I am wanting to pull in the MO Construction filed if the field in the
NAME Column= IPS. When I add this it brings back a -1 value..

And IIf([NAME]="IPS",[MO CONSTRUCTION])

Any suggestions?

Thanks
beebobs
 
K

Ken Snell \(MVP\)

You need to use nested IIf expressions:

MO: IIf(IsNull([MO MATERIAL]) & " " & [MO MATERIAL],[,[MO ENGINEERING],
IIf([NAME]="IPS",[MO CONSTRUCTION], "No Result Found"))
 
J

John Spencer (MVP)

Perhaps you should tell us what you are attempting to do in words.
This expression is not understandable.

MO: IIf(IsNull([MO MATERIAL]) & " " & [MO MATERIAL],[MO ENGINEERING])

Perhaps you want to return Mo Material is it is not null or if it is not ""
and otherwise return Mo Engineering.

MO: IIF(Len([Mo Material] & "") > 0, [MO Material],[Mo Engineering])

The next part is more confusing, but perhaps you mean you want
Mo Construction if some field ?Name? = IPS
And if Not then Mo Material if it is not blank or null
and final choice is Mo Engineering.

MO: IIF([Name] = "IPS",[MO Construction], IIF(Len([Mo Material] & "") > 0, [MO
Material],[Mo Engineering]))


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
K

Ken Snell \(MVP\)

Typo in expression:

MO: IIf(IsNull([MO MATERIAL]) & " " & [MO MATERIAL],[MO ENGINEERING],
IIf([NAME]="IPS",[MO CONSTRUCTION], "No Result Found"))

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/



Ken Snell (MVP) said:
You need to use nested IIf expressions:

MO: IIf(IsNull([MO MATERIAL]) & " " & [MO MATERIAL],[,[MO ENGINEERING],
IIf([NAME]="IPS",[MO CONSTRUCTION], "No Result Found"))

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/




beebobs said:
I have added the first fine I wanting to bring the MO ENGINEERING, form
my
query the MO Material field was null.. this works fine

MO: IIf(IsNull([MO MATERIAL]) & " " & [MO MATERIAL],[MO ENGINEERING])

Now I am wanting to pull in the MO Construction filed if the field in the
NAME Column= IPS. When I add this it brings back a -1 value..

And IIf([NAME]="IPS",[MO CONSTRUCTION])

Any suggestions?

Thanks
beebobs
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top