checkboxes and iif statements

C

Crisyina

I have a table that has five different columns with checkboxes. I made a
query for this table and i want the last column to show the final group
responible based on the number of checks filled and checks not filled. For
exmaple:

Design PE REq CNC req CNC Complete PE Complete
Required
checked Checked no check no check no check
Prodicibility

So far i have this in my Criteria:
IIf([Design Complete]=No,"Tech Services",IIf([Design Complete]=Yes And [PE
Required]=Yes And "CNC Required]"=No And [CNC Complete]=No And [PE
Complete]=No,"Producibility"))

But it asks for parameters which i do not want and the table show nothing,
can someone help me?
 
K

Klatuu

Yes abd No have no meaning to either Access or Jet SQL. Use -1 for Yes
(True) and 0 for No (False)
 
M

Michael Gramelspacher

I have a table that has five different columns with checkboxes. I made a
query for this table and i want the last column to show the final group
responible based on the number of checks filled and checks not filled. For
exmaple:

Design PE REq CNC req CNC Complete PE Complete
Required
checked Checked no check no check no check
Prodicibility

So far i have this in my Criteria:
IIf([Design Complete]=No,"Tech Services",IIf([Design Complete]=Yes And [PE
Required]=Yes And "CNC Required]"=No And [CNC Complete]=No And [PE
Complete]=No,"Producibility"))

But it asks for parameters which i do not want and the table show nothing,
can someone help me?
And "CNC Required]"=No

looks like typo, try

And [CNC Required]=No
 
O

Ofer Cohen

In you IIF, you have a mistake

Look at CNC Required

IIf([Design Complete]=No,"Tech Services",IIf([Design Complete]=Yes And [PE
Required]=Yes And "CNC Required]"=No And [CNC Complete]=No And [PE
Complete]=No,"Producibility"))

Need to be
So far i have this in my Criteria:
IIf([Design Complete]=False,"Tech Services",IIf([Design Complete]=True And
[PE
Required]=True And [CNC Required]=False And [CNC Complete]=False And [PE
Complete]=False,"Producibility",""))
 
Top