Les Isaacs
Registered User.
- Local time
- Today, 14:48
- Joined
- May 6, 2008
- Messages
- 186
Hi All
I thought I knew about criteria, but cannot for the life of me get this to work - should be simple, but no joy - so I suspect it's a Gates Gaff
The criteria I have is:
IIf([Forms]![frmAthletesRegistration]![optSex]=1,"M",IIf([Forms]![frmAthletesRegistration]![optSex]=2,"F","M" Or "F"))
So:
If [Forms]![frmAthletesRegistration]![optSex]=1, I want the males,
If [Forms]![frmAthletesRegistration]![optSex]=2, I want the females,
If [Forms]![frmAthletesRegistration]![optSex]=3, I want the males and females.
This works fine where [Forms]![frmAthletesRegistration]![optSex]=1 or 2, but when [Forms]![frmAthletesRegistration]![optSex]=3 the query returns no records
I've tried all sorts:
IIf([Forms]![frmAthletesRegistration]![optSex]=1,"M",IIf([Forms]![frmAthletesRegistration]![optSex]=2,"F",Like "*"))
or
IIf([Forms]![frmAthletesRegistration]![optSex]=1,"M",IIf([Forms]![frmAthletesRegistration]![optSex]=2,"F",Like "?"))
or
IIf([Forms]![frmAthletesRegistration]![optSex]=1,"M",IIf([Forms]![frmAthletesRegistration]![optSex]=2,"F",>"A"))
but none of these return any records :banghead:
Is it me, or Gates?
Thanks for any help.
Les
I thought I knew about criteria, but cannot for the life of me get this to work - should be simple, but no joy - so I suspect it's a Gates Gaff
The criteria I have is:
IIf([Forms]![frmAthletesRegistration]![optSex]=1,"M",IIf([Forms]![frmAthletesRegistration]![optSex]=2,"F","M" Or "F"))
So:
If [Forms]![frmAthletesRegistration]![optSex]=1, I want the males,
If [Forms]![frmAthletesRegistration]![optSex]=2, I want the females,
If [Forms]![frmAthletesRegistration]![optSex]=3, I want the males and females.
This works fine where [Forms]![frmAthletesRegistration]![optSex]=1 or 2, but when [Forms]![frmAthletesRegistration]![optSex]=3 the query returns no records
I've tried all sorts:
IIf([Forms]![frmAthletesRegistration]![optSex]=1,"M",IIf([Forms]![frmAthletesRegistration]![optSex]=2,"F",Like "*"))
or
IIf([Forms]![frmAthletesRegistration]![optSex]=1,"M",IIf([Forms]![frmAthletesRegistration]![optSex]=2,"F",Like "?"))
or
IIf([Forms]![frmAthletesRegistration]![optSex]=1,"M",IIf([Forms]![frmAthletesRegistration]![optSex]=2,"F",>"A"))
but none of these return any records :banghead:
Is it me, or Gates?
Thanks for any help.
Les