Somebody help! on If...,Then....ElseIf

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

'll be pleased if somebody could help me generate an expression or better
still a statement that will evaluate a value in a field and represent it with
a txt in another field.
Is thre a way out?

An example is;

If Totals >70, Then Grade=A
ElseIf Totals >60but<70 Grade=B
Else......till F.Where the options will end.

NB. Totals and Grade are fields on a query.
Thanks for helping.
 
In the query create a new field, using IIf

Grade : IIf([Totals]>70,"A",IIf([Totals]>60,"B","C"))
 
Use the SWITCH function:

SWITCH([Totals]>70,"A",[Totals]>60,"B",[Totals]>50,"C",[Totals]>40,"D")

etc.

MH
 
Cohen,
that was just what i was looking for. am grateful, but you are great!
Nice Things! To HM also.

Ofer Cohen said:
In the query create a new field, using IIf

Grade : IIf([Totals]>70,"A",IIf([Totals]>60,"B","C"))

--
Good Luck
BS"D


Gorros said:
'll be pleased if somebody could help me generate an expression or better
still a statement that will evaluate a value in a field and represent it with
a txt in another field.
Is thre a way out?

An example is;

If Totals >70, Then Grade=A
ElseIf Totals >60but<70 Grade=B
Else......till F.Where the options will end.

NB. Totals and Grade are fields on a query.
Thanks for helping.
 
MH,
That was great you know?
Keep helping. am grateful. Stay kull

MH said:
Use the SWITCH function:

SWITCH([Totals]>70,"A",[Totals]>60,"B",[Totals]>50,"C",[Totals]>40,"D")

etc.

MH


Gorros said:
'll be pleased if somebody could help me generate an expression or better
still a statement that will evaluate a value in a field and represent it
with
a txt in another field.
Is thre a way out?

An example is;

If Totals >70, Then Grade=A
ElseIf Totals >60but<70 Grade=B
Else......till F.Where the options will end.

NB. Totals and Grade are fields on a query.
Thanks for helping.
 

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

Similar Threads


Back
Top