P
pokdbz
I need to find the maximum value of 2 items in a text box. How doe the Dmax
work. I can't seem to get it to work.
work. I can't seem to get it to work.
Brendan Reynolds said:If the two items are in one text box, what is the delimiter, i.e. what
separates one value from the other?
For example, if the two items were delimited by a space ...
2.3 1.2
... the following expression would return the maximum of the two ...
=IIf(Val(Left$([Text0],InStr([Text0],"
")-1))<Val(Mid$([Text0],InStr([Text0],"
")+1)),Mid$([Text0],InStr([Text0]," ")+1),Left$([Text0],InStr([Text0],"
")-1))
Replace "[Text0]" with the name of your text box, and the space (" ") with
your delimiter.
The DMax function retrieves the maximum value from a table or query, it
won't help with a text box.
--
Brendan Reynolds
pokdbz said:I need to find the maximum value of 2 items in a text box. How doe the
Dmax
work. I can't seem to get it to work.
Lynn Trapp said:What do you mean by "2 items in a text box"?
DMax returns the maximum value of a field in a domain (table or query) based
on some criteria. Here's an example from the Help file.
=DMax("[Freight]", "Orders", "[ShipRegion] = 'CA'")
--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html
pokdbz said:I need to find the maximum value of 2 items in a text box. How doe the
Dmax
work. I can't seem to get it to work.
pokdbz said:I ment 2 seperate text boxes. Douglas's suggestion should help me out.
Lynn Trapp said:What do you mean by "2 items in a text box"?
DMax returns the maximum value of a field in a domain (table or query)
based
on some criteria. Here's an example from the Help file.
=DMax("[Freight]", "Orders", "[ShipRegion] = 'CA'")
--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html
pokdbz said:I need to find the maximum value of 2 items in a text box. How doe the
Dmax
work. I can't seem to get it to work.