Compare values and drop lowest value

Rakier

Registered User.
Local time
Today, 10:22
Joined
Mar 21, 2002
Messages
75
Hey all,

I'm trying to come up with a way to generate 4 random numbers and then add the three highest numbers together to get a result.

I can generate the numbers, but am not sure how to add just the three highest numbers while ignoring the lowest value. Any ideas?
 
You can use a query and just return the top 3 values. How and where do u create the 4 numbers?
 
They are not stored anywhere at the moment. I have a command button that when clicked generates the numbers. The result then populates a text box.

I know that I could probably create a table and populate it with the random numbers than get generated and then do the query, but I was hoping to just do it in code.
 
if your code creates four numbers then y dont u just create 3 numbers?
 

Users who are viewing this thread

Back
Top Bottom