parse data and select unique records

J

Jeannie

I have successfully parsed a field in a query, but it produces duplicate
values in the resulting dynaset. When I set the properties of the query to
Unique Values=yes, I get "Invalid procedure or call" error. Here is my
parsed expression:
iif([alloy]<"1",[alloy],Left([alloy],Instr(1,[Alloy]," ")-1)

the <"1" has to be there instead of is null because of poor, mysterious
design by my predecessor!

Thanks
 
M

Marshall Barton

Jeannie said:
I have successfully parsed a field in a query, but it produces duplicate
values in the resulting dynaset. When I set the properties of the query to
Unique Values=yes, I get "Invalid procedure or call" error. Here is my
parsed expression:
iif([alloy]<"1",[alloy],Left([alloy],Instr(1,[Alloy]," ")-1)

the <"1" has to be there instead of is null because of poor, mysterious
design by my predecessor!


Strange thing to be doing!?

You will get that error when Alloy does not contain a space.
 
L

Lord Kelvan

you will need another nested iif to handle the space problem

iif([alloy]<"1",[alloy],iif(Instr(1,[Alloy]," "),Left([alloy],Instr(1,
[Alloy]," ")-1),"do something else here")
 

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