Returning text after a specific value with restrictions

ddennis

New Member
Joined
Apr 21, 2004
Messages
22
Dear All:

I have created a MS Access form based on a query. In a field called "Honors", it returns text based on gpa and division(The division is Graduate or Undergraduate).

In the excel version of this form, this is the code I used to return the appropriate message:
=IF(I5="Undergraduate",IF(G5>=3.8,"SUMMA CUM LAUDE",IF(G5>=3.5,"MAGNA CUM LAUDE",IF(G5<=3.2,"NONE",IF(G5>=3.2,"CUM LAUDE")))),"")

I would like to use this code, I reckon the VB version of this Excel code to return the appropriate message in the honors field of this MS Access form.

I am the worst programmer on earth, any help is greatly appreciated.

Many thanks in advance,

Dion :p
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
In your query, add a calculated field that would look something like:

Code:
MyValue:IIF(FieldName1="Undergraduate",IIF(FieldName2>=3.8,"SUMMA CUM LAUDE",IIF(FieldName2>=3.5,"MAGNA CUM LAUDE",IIF(FieldName2<=3.2,"NONE",IIF(FieldName2>=3.2,"CUM LAUDE")))),"")
(essentially, you are simply replacing your cell references with field names and replacing all "IF" with "IIF").
 
Upvote 0

Forum statistics

Threads
1,221,783
Messages
6,161,938
Members
451,730
Latest member
BudgetGirl

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top