...

View Full Version : Putting the 6 numbers in an order



telmessos
10-30-2007, 09:50 PM
Hi,

I get 6 numbers from my database on the same record. (each record has number1,number2,number3,number4,number5,number6 fields) I want my code check which the smaller one is for each record. Maybe there's an easy way to do it. But my brain is stopped. Can anyone help

Thanks
telmessos

telmessos
10-31-2007, 10:22 AM
Hi all,

After I posted this question, I focused on the idea again and made it the following way. I hope in the future you need such thing and will help someone in the forum

Dim myArray2(5)
myArray2(0) = ors2.Fields("period1").value
myArray2(1) = ors2.Fields("period2").value
myArray2(2) = ors2.Fields("period3").value
myArray2(3) = ors2.Fields("period4").value
myArray2(4) = ors2.Fields("period5").value
myArray2(5) = ors2.Fields("period6").value
smallestnumber = ors2.Fields("period1").value
for i = 1 to 5
if myArray2(i) < smallestnumber then
smallestnumber = myArray2(i)
end if
Next

Thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum