IIf statement field asking for Paramaters? (1 Viewer)

jyadayada

Registered User.
Local time
Today, 22:54
Joined
Sep 6, 2018
Messages
44
I've had this before but every version i submit when i switch to datasheet view asks for Paramaters, i'm creating a field ina query called Group_Space_Available_CM and the expression reads:


Group_Space_Available_CM: IIF([Space_Type]="Legacy",[Space_Available_CM]/6,IIF[Space_Type]="Dual",[Space_Available_CM]/10))


I've got other IIF staements in the saame query that are written the same way and they don't ask for paramaters?
 

Minty

AWF VIP
Local time
Today, 22:54
Joined
Jul 26, 2013
Messages
10,355
Double check the typing, that's frequently caused by a mis-spelt field name.
 

Ranman256

Well-known member
Local time
Today, 18:54
Joined
Apr 9, 2015
Messages
4,339
you missed the left paren on the 2nd IIF

,IIF([Space_Type]="Dual",[Space_Available_CM]/10))
 

jyadayada

Registered User.
Local time
Today, 22:54
Joined
Sep 6, 2018
Messages
44
that was a typo in here, it's in in the access query


IIf([Space_Type]="Legacy",[Space_Available_CM]/6,IIf([Space_Type]="Dual",{Space_Available_CM]/10))


I've taken it out and rewritten it and it still snags
 

Gasman

Enthusiastic Amateur
Local time
Today, 22:54
Joined
Sep 21, 2011
Messages
14,048
IIf([Space_Type]="Legacy",[Space_Available_CM]/6,IIf([Space_Type]="Dual",{Space_Available_CM]/10))
 

jyadayada

Registered User.
Local time
Today, 22:54
Joined
Sep 6, 2018
Messages
44
IIF([Space_Type]="Legacy",[Space_Available_CM]/6,IIF([Space_Type]="Dual",[Space_Available_CM]/10))


it's written correctly in the access query, I keep mistyping in here as i'm on two machines, the field names are correct, everythings spelt right, bracketed right,
 

Minty

AWF VIP
Local time
Today, 22:54
Joined
Jul 26, 2013
Messages
10,355
What about in any underlying queries then?
If you haven't set any parameters it will only ask when it can't identify where it's supposed to find what it's asking you for?

Screenshot the parameter input box and show us what it is asking for?
 

jyadayada

Registered User.
Local time
Today, 22:54
Joined
Sep 6, 2018
Messages
44
Thank you!


There's another expression in the query referring to this field, which I had now renamed after IIFing it, what a doof!
 

Gasman

Enthusiastic Amateur
Local time
Today, 22:54
Joined
Sep 21, 2011
Messages
14,048
IIF([Space_Type]="Legacy",[Space_Available_CM]/6,IIF([Space_Type]="Dual",[Space_Available_CM]/10))


it's written correctly in the access query, I keep mistyping in here as i'm on two machines, the field names are correct, everythings spelt right, bracketed right,

Try Copy and Paste then?
 

Users who are viewing this thread

Top Bottom