Query Formula help please

  • Thread starter Thread starter Johnathon Anderson
  • Start date Start date
J

Johnathon Anderson

I hope someone can point out my error.

If [Equipment] = "Shoes Only"
or
If [Equipment] = "Not Required"

and (if either of the 2 above are true)

If [ShoeSize] = Null

then
"Please supply your child's shoes size"

This does not work

NoShoeSize: IIf([Equipment] Not Like "Shoes Only" Or [Equipment] Not Like
"Not Required" And [ShoesSize] Is Null,"Please supply your child's shoes
size")

I have tried many variations but can't get it to work

Thank you

Johnathon
 
Sorry I made a mistake in my question
___________________

I hope someone can point out my error.

If [Equipment] is Not = "School Shoes Only"
or
If [Equipment] is not = "Not Required"

and (if either of the 2 above are true)

If [ShoeSize] = Null

then
"Please supply your child's shoes size"

This does not work

NoShoeSize: IIf([Equipment] Not Like "School Shoes Only" Or [Equipment] Not
Like
"Not Required" And [ShoesSize] Is Null,"Please supply your child's shoes
size")

I have tried many variations but can't get it to work
 
Supplying the shoe size will always return an empty record because you've
also told it that the shoe size is null. The following query will return
record which fit your requirements of a null shoe size:

SELECT Equipment, ShoeSize
FROM tblTest
WHERE (((Equipment)<>"School Shoes Only") AND ((ShoeSize) Is Null)) OR
(((Equipment)<>"Not Required") AND ((ShoeSize) Is Null));
 
Thank you very much for your help



Arvin Meyer said:
Supplying the shoe size will always return an empty record because you've
also told it that the shoe size is null. The following query will return
record which fit your requirements of a null shoe size:

SELECT Equipment, ShoeSize
FROM tblTest
WHERE (((Equipment)<>"School Shoes Only") AND ((ShoeSize) Is Null)) OR
(((Equipment)<>"Not Required") AND ((ShoeSize) Is Null));
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


Johnathon Anderson said:
Sorry I made a mistake in my question
___________________

I hope someone can point out my error.

If [Equipment] is Not = "School Shoes Only"
or
If [Equipment] is not = "Not Required"

and (if either of the 2 above are true)

If [ShoeSize] = Null

then
"Please supply your child's shoes size"

This does not work

NoShoeSize: IIf([Equipment] Not Like "School Shoes Only" Or [Equipment]
Not
Like
"Not Required" And [ShoesSize] Is Null,"Please supply your child's shoes
size")

I have tried many variations but can't get it to work
 

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

Back
Top