MOVE

  • Thread starter Thread starter Vina
  • Start date Start date
V

Vina

I have this rule:

Select recordset.... (this will have multiple records)

If recordcount > 0 then

if x = a then ....
else
do this.....

End If
End If

What I need is that it looks at the first record aand if
meets the criteria do all this but want it to loop so it
will look at the 2nd record and see if it's going to meet
the criteria then do the same thing.

I tried the MOVE command but no luck. CAn someone help me
on the syntax on how should i include that in my
statement. It's for Access 97.

Thanks
Vina
 
Hi,



With Me.RecordsetClone
.MoveFirst
If .Fields("fieldNameHere") = "a" Then
.MoveNext ' move to the next record
If .Fields( ...) ... Then
...
End If
End If
End With



Hoping it may help,
Vanderghast, Access MVP
 
Thanks but maybe you can help me.

In my recordset it is only returning one record shoud i
use another kind? here's what i had for select

Set rs = CurrentDb.OpenRecordset("Select
CO_NUMBER,CUS_PO, SHIP_ID, PROM_DLVRY, LN_STA,
PRICE_LEVEL, CSR, SHIP_VIA, FREIGHT, TERMS, CONTACT,
CONTACT_PHONE from tblNEWORDERS where AFLAG = '-1'")

I am not sure why it is returning only 1 which there are
2 records. should i not use the Recordset?
 
Hi,


I don't know the logic of the problem, so I don't know what you should
do in the particular cases.

What DCount return? Is it returning 2 or 1, with the following (in the
debug, immediate, window)

? DCount("*", "tblNeworders", "Aflag='-1' " )


Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top