Expressions

G

Guest

I have a query with 2 fields in (Unit 1) and (unit 2) I have added a 3rd
field which is called results

I want expression in results field that states full award if unit 1 and Unit
2 both state "Pass" otherwise leave blank

I have tried the expression below to no avail

iiF([unit 1]=â€PASS†And [unit 2]=â€PASSâ€,â€FULLâ€,â€â€)

I keep getting parameter query box????????

Help Please

Thanks
 
G

Guest

Try:

iiF(([unit 1]=â€PASS†And [unit 2]=â€PASSâ€),â€FULLâ€,â€â€)
 
G

Guest

thanks for your reply, however when I pasted this into the query grid i got
reply that said this expression has an extra ).

Can I also check with you whether in the query grid if I have to show
'expression' in the total row and do i have to show the name of the table in
the table row?

thanks for help so far
k11ngy

scubadiver said:
Try:

iiF(([unit 1]=â€PASS†And [unit 2]=â€PASSâ€),â€FULLâ€,â€â€)

--
"Loose Change 2nd Edition" has been seen by almost 7 million people on
Google video


K11ngy said:
I have a query with 2 fields in (Unit 1) and (unit 2) I have added a 3rd
field which is called results

I want expression in results field that states full award if unit 1 and Unit
2 both state "Pass" otherwise leave blank

I have tried the expression below to no avail

iiF([unit 1]=â€PASS†And [unit 2]=â€PASSâ€,â€FULLâ€,â€â€)

I keep getting parameter query box????????

Help Please

Thanks
 
D

Douglas J. Steele

What scubadiver suggested has balanced parentheses. Did you remember to put
the two opening parentheses after IIf?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


K11ngy said:
thanks for your reply, however when I pasted this into the query grid i
got
reply that said this expression has an extra ).

Can I also check with you whether in the query grid if I have to show
'expression' in the total row and do i have to show the name of the table
in
the table row?

thanks for help so far
k11ngy

scubadiver said:
Try:

iiF(([unit 1]="PASS" And [unit 2]="PASS"),"FULL","")

--
"Loose Change 2nd Edition" has been seen by almost 7 million people on
Google video


K11ngy said:
I have a query with 2 fields in (Unit 1) and (unit 2) I have added a
3rd
field which is called results

I want expression in results field that states full award if unit 1 and
Unit
2 both state "Pass" otherwise leave blank

I have tried the expression below to no avail

iiF([unit 1]="PASS" And [unit 2]="PASS","FULL","")

I keep getting parameter query box????????

Help Please

Thanks
 
G

Guest

Yes, I did do that

Have I done right by clicking the auto sum button in query grid, choosing
expression in total row and of course showing relevant table in table row?

I either get too many brackets, or the closest I get is when I click RUN it
actually performs a paremeter query asking me for "Pass" "Full" and ""

Really stuck her

Thanks for any assistance

Douglas J. Steele said:
What scubadiver suggested has balanced parentheses. Did you remember to put
the two opening parentheses after IIf?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


K11ngy said:
thanks for your reply, however when I pasted this into the query grid i
got
reply that said this expression has an extra ).

Can I also check with you whether in the query grid if I have to show
'expression' in the total row and do i have to show the name of the table
in
the table row?

thanks for help so far
k11ngy

scubadiver said:
Try:

iiF(([unit 1]="PASS" And [unit 2]="PASS"),"FULL","")

--
"Loose Change 2nd Edition" has been seen by almost 7 million people on
Google video


:

I have a query with 2 fields in (Unit 1) and (unit 2) I have added a
3rd
field which is called results

I want expression in results field that states full award if unit 1 and
Unit
2 both state "Pass" otherwise leave blank

I have tried the expression below to no avail

iiF([unit 1]="PASS" And [unit 2]="PASS","FULL","")

I keep getting parameter query box????????

Help Please

Thanks
 
D

Douglas J. Steele

What's the SQL of your query? (If you're not familiar with working directly
with SQL, open the query in Design view, then select SQL View from the View
menu)

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


K11ngy said:
Yes, I did do that

Have I done right by clicking the auto sum button in query grid, choosing
expression in total row and of course showing relevant table in table row?

I either get too many brackets, or the closest I get is when I click RUN
it
actually performs a paremeter query asking me for "Pass" "Full" and ""

Really stuck her

Thanks for any assistance

Douglas J. Steele said:
What scubadiver suggested has balanced parentheses. Did you remember to
put
the two opening parentheses after IIf?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


K11ngy said:
thanks for your reply, however when I pasted this into the query grid i
got
reply that said this expression has an extra ).

Can I also check with you whether in the query grid if I have to show
'expression' in the total row and do i have to show the name of the
table
in
the table row?

thanks for help so far
k11ngy

:


Try:

iiF(([unit 1]="PASS" And [unit 2]="PASS"),"FULL","")

--
"Loose Change 2nd Edition" has been seen by almost 7 million people on
Google video


:

I have a query with 2 fields in (Unit 1) and (unit 2) I have added
a
3rd
field which is called results

I want expression in results field that states full award if unit 1
and
Unit
2 both state "Pass" otherwise leave blank

I have tried the expression below to no avail

iiF([unit 1]="PASS" And [unit 2]="PASS","FULL","")

I keep getting parameter query box????????

Help Please

Thanks
 
G

Guest

Hi

Thanks for help, finally gor it to work

I found that at the end of of the formula I had "" which I actually wanted
so that I can show empty text in result if there was not 2 x pass

I changed the "" to "None" and it worked

But how can I show empty text in cell?

Kind regards

Steve


Douglas J. Steele said:
What's the SQL of your query? (If you're not familiar with working directly
with SQL, open the query in Design view, then select SQL View from the View
menu)

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


K11ngy said:
Yes, I did do that

Have I done right by clicking the auto sum button in query grid, choosing
expression in total row and of course showing relevant table in table row?

I either get too many brackets, or the closest I get is when I click RUN
it
actually performs a paremeter query asking me for "Pass" "Full" and ""

Really stuck her

Thanks for any assistance

Douglas J. Steele said:
What scubadiver suggested has balanced parentheses. Did you remember to
put
the two opening parentheses after IIf?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


thanks for your reply, however when I pasted this into the query grid i
got
reply that said this expression has an extra ).

Can I also check with you whether in the query grid if I have to show
'expression' in the total row and do i have to show the name of the
table
in
the table row?

thanks for help so far
k11ngy

:


Try:

iiF(([unit 1]="PASS" And [unit 2]="PASS"),"FULL","")

--
"Loose Change 2nd Edition" has been seen by almost 7 million people on
Google video


:

I have a query with 2 fields in (Unit 1) and (unit 2) I have added
a
3rd
field which is called results

I want expression in results field that states full award if unit 1
and
Unit
2 both state "Pass" otherwise leave blank

I have tried the expression below to no avail

iiF([unit 1]="PASS" And [unit 2]="PASS","FULL","")

I keep getting parameter query box????????

Help Please

Thanks
 
D

Douglas J. Steele

"Cell" implies Excel: are you actually doing this in Excel?

Try replacing "None" with Null (no quotes)

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


K11ngy said:
Hi

Thanks for help, finally gor it to work

I found that at the end of of the formula I had "" which I actually wanted
so that I can show empty text in result if there was not 2 x pass

I changed the "" to "None" and it worked

But how can I show empty text in cell?

Kind regards

Steve


Douglas J. Steele said:
What's the SQL of your query? (If you're not familiar with working
directly
with SQL, open the query in Design view, then select SQL View from the
View
menu)

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


K11ngy said:
Yes, I did do that

Have I done right by clicking the auto sum button in query grid,
choosing
expression in total row and of course showing relevant table in table
row?

I either get too many brackets, or the closest I get is when I click
RUN
it
actually performs a paremeter query asking me for "Pass" "Full" and ""

Really stuck her

Thanks for any assistance

:

What scubadiver suggested has balanced parentheses. Did you remember
to
put
the two opening parentheses after IIf?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


thanks for your reply, however when I pasted this into the query
grid i
got
reply that said this expression has an extra ).

Can I also check with you whether in the query grid if I have to
show
'expression' in the total row and do i have to show the name of the
table
in
the table row?

thanks for help so far
k11ngy

:


Try:

iiF(([unit 1]="PASS" And [unit 2]="PASS"),"FULL","")

--
"Loose Change 2nd Edition" has been seen by almost 7 million people
on
Google video


:

I have a query with 2 fields in (Unit 1) and (unit 2) I have
added
a
3rd
field which is called results

I want expression in results field that states full award if unit
1
and
Unit
2 both state "Pass" otherwise leave blank

I have tried the expression below to no avail

iiF([unit 1]="PASS" And [unit 2]="PASS","FULL","")

I keep getting parameter query box????????

Help Please

Thanks
 

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