If Function (1 Viewer)

racdata

Registered User.
Local time
Today, 17:09
Joined
Oct 30, 2002
Messages
74
Hi, I struggle with the following.
I have 2 fields (CantLH and CantRH) where I enter a reading.
Then a text box to give me the difference. =[CantRH]-[CantLH] 12 -0 = -12[A1]. Or 0-12 = +12[A1].
One will always be a 0 (zero).
0 left hand and 0 right hand is the ideal reading and in the "A" standard.

Now I need to display if the answer is in an "A", "B", or "C" Standard.
I have this.
If([A1] between -3 and 3, “A”,” “)

How do I get them all in one function??
If [A1] Between -3 and 3, "A"
If [A1] Between 3.1 and 12, "B"
If [A1] Between -3.1 and -7, "B"
If [A1] >12, "C"
If [A1] <-7, "C".

I need to display one of the standards “A”,”B” or “C”.
I hope this make sense
 

vbaInet

AWF VIP
Local time
Today, 15:09
Joined
Jan 22, 2010
Messages
26,374
Did you even look into the CASE statement that was suggested?
 

MStef

Registered User.
Local time
Today, 15:09
Joined
Oct 28, 2004
Messages
2,251
Look at "DemoABC_A20022003.mdb" (attachment, zip).
Look at Table1, Query1 (column 3 and 4), Form1 (Record Source).
Open form and try.
I think it is what you need. Adapt it in your MDB.
 

Attachments

  • DemoABC_A20022003.zip
    12.4 KB · Views: 75

Users who are viewing this thread

Top Bottom