Hi John,
Sorry it took so long to get back to you. I checked my table
(tblPipeMaterial) and it is not a lookup, just text. I have only two fields:
PipeMaterialID and PipeMaterial. I would like the query to give the score
because I need to add that result to other scores (water pressure, age of
pipe, etc.). Those queries are working I'm guessing because it's numbers.
For example my table for pressure is: tblPressure with fields of PressureID
and Pressure (a number field). The query gives the pressure a score as
follows:
PressureScore:
IIf([Pressure]<=80,"0",IIf([Pressure]<=100,"2",IIf([Pressure]<=120,"4",IIf([Pressure]<=140,"6",IIf([Pressure]>=141,"8")))))
and it works great. Of course the data is entered into a form. I just
can't get the Pipe Material to do the same.
Please help. I've spent so much time trying to figure this out and written
several times. It's getting crunch time now. I really appreciate your help.
Thank you.
--
MB
John W. Vinson said:
I've written before and thought I had the answer, but I’m still lost. I have
a points for each of our pipe material:
Cast Iron – Lined = 6
Cast Iron – Unlined = 6
Ductile = 4
PVC = 2
HDPE = 2
My query name is qryScores. I tried the following but no luck.
MaterialScore=IIf([PipeMaterial] Like "Cast*", 6,
IIf([PipeMaterial]="Ductile",4,2))
What am I doing wrong?
I'm desperate!
Is the [Pipe Material] field perchance a Lookup Field? If so, it *APPEARS* to
contain the text "Ductile" but it actually does not; it will contain a
concealed numeric ID.