pull the higher of the two values

F

fishqqq

Can someone please suggest how i would format a text box to take the
higher value of two other text boxes?

ie.
Textbox1 =100
Textbox2 = 200
textbox 3 will update itself with the higher value (either textbox 1
or 2).

note the textboxes are formatted for numbers only.
I was going to have a macro update textbox 3 using the "afterupdate"
property of Textbox2

thanks,
Steve
 
J

Jon Lewis

Use the following as the Control Source of Textbox3:

=IIf([Textbox1]>[Textbox2],[Textbox1],[Textbox2])

and it will update itself - no VBA or Macro needed

HTH
Jon
 
F

fishqqq

Use the following as the Control Source of Textbox3:

=IIf([Textbox1]>[Textbox2],[Textbox1],[Textbox2])

and it will update itself - no VBA or Macro needed

HTH
Jon


Can someone please suggest how i would format a text box to take the
higher value of two other text boxes?
ie.
Textbox1 =100
Textbox2 = 200
textbox 3 will update itself with the higher value (either textbox 1
or 2).
note the textboxes are formatted for numbers only.
I was going to have a macro update textbox 3 using the "afterupdate"
property of Textbox2
thanks,
Steve

that's great - thanks Jon
 

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