Largest text box

J

Johnny Bright

Hi there!

I have 3 text boxes on my form and I need to find the largest number among
the three.

I tried =max([txt1],[txt2],txt3]) but this is obviously wrong. How can I do
this?

Thanks for all help offered!
 
K

Klatuu

With Me
If .txt 1 > .txt2 And .tx1 > txt3 Then
'Txt1 is greatest
ElseIf .txt2 > .txt1 And .txt2 > .txt3 Then
'Txt2 is greatest
Else
'txt3 is greatest
End If
End With
 
A

Al Campagna

John,
To determine the largest numerical value between three text controls
(Num1, Num2, Num3)

=IIf([Num1]>[Num2] And
[Num1]>[Num3],"Num1",IIf([Num2]>[Num3],"Num2","Num3"))

Refresh on the AfterUpdate of each NumX field.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

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