|
-
Nov 24th, 2005, 09:36 PM
#1
Thread Starter
Member
Maximum Coding Problem
Hello Guyzz..
I have a little problem here..I know this might be very easy to some people but I dont know why this become problem to me!
This is a codes to find a maximum number. But I dont know why when it trace a comparison between single digit number and 2 digit number, the data not accurate anymore. Example:
initial max = 0
DocID = 4, 8 , 10 , 12
PROBLEM: when max = 8 , compare to DocID = 10, the max value still remains as 8!
VB Code:
Do While Not DataSISPEDA.Recordset.EOF
If max <= Trim(DataSISPEDA.Recordset.Fields("DocID").Value) Then
max = Trim(DataSISPEDA.Recordset.Fields("DocID").Value)
DataSISPEDA.Recordset.MoveNext
Else
DataSISPEDA.Recordset.MoveNext
End If
Loop
I cannot find any error here..Plz anyone help me on this..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|