Distinct value...pls help
Hi
How can I retrieve the next value from distinct using the code below?
*********************************************************
Qry = "Select distinct size from parttb Where id = '" & txtItem.List(i) & "' "
Set RawSql = New ADODB.Recordset
RawSql.CursorLocation = adUseClient
RawSql.Open Qry, S_GateDb, adOpenDynamic, adLockPessimistic
Size1 = RawSql(0)
//How to get size2 and so on
*********************************************************
Kindly enlightened me. Thanks alot
Re: Distinct value...pls help
You need to navigate through the recordset by calling MoveNext (Previous, First, Last) method(s):
Code:
RawSql.MoveNext
If RawSql.EOF THen RawSql.MoveLast
Re: Distinct value...pls help
Use this
VB Code:
while Rset.EOF = False
....
RSET.MoveNext
wend
Re: Distinct value...pls help
Try This
First of all count total records in recordset
then declare an arry subject to totalrecords
start do while loop till eof
move size from table to array
do while Rset.Eof = False
size[1] = Rset!size
Rset.MoveNext
Loop
Resolved: Distinct value...pls help
Thanks a lot...
I solved it using Do Loop.. then RawSql.MoveNext