Next Record Value Check 
Author Message
 Next Record Value Check

HiHiHi,

I want to check a value in the next record of a recordset. I had
intended to use the DLookup function, but I cannot figure out how to
have the module know what the next record is.

The lookup is occuring deep in a nested Do.. While Loop.

The recordset used is the result of a query. This recordset may have
one record, or it may have 100 records in it.

I do not care how, but I want to base operations on one record on the
value in the next record.

Also, does anyone know of good information on Access Cursors (like
MSSQL Cursors)?

thanx

V.
*****
I never >try< anything
I just do it.

Wanna Try Me?
*****



Tue, 05 Jun 2001 03:00:00 GMT  
 Next Record Value Check
try something like this:

...
do while not rs.eof
    mark=rs.bookmark
    rs.movenext
    [do whatever u wanna do with this "next" record]
    rs.bookmark = mark
    [do whatever u wanna do with this "current" record]
    rs.movenext
loop

--

='='='='='='='=
Mario Osorio
='='='='='='='=



Quote:
>HiHiHi,

>I want to check a value in the next record of a recordset. I had
>intended to use the DLookup function, but I cannot figure out how to
>have the module know what the next record is.

>The lookup is occuring deep in a nested Do.. While Loop.

>The recordset used is the result of a query. This recordset may have
>one record, or it may have 100 records in it.

>I do not care how, but I want to base operations on one record on the
>value in the next record.

>Also, does anyone know of good information on Access Cursors (like
>MSSQL Cursors)?

>thanx

>V.
>*****
>I never >try< anything
>I just do it.

>Wanna Try Me?
>*****



Tue, 05 Jun 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Doing Error Checking before moving to next record

2. Checking for next object in record

3. Checking if the next record is the last

4. Enter,Next Row and Clear for Next record

5. going to next record after inserting a new record

6. Check for checked values in List Box

7. Check Box being checked if database value is equal to ON

8. Checking for matching records in two tables with different record structures

9. logon script to check the next available drive letter (The code is a bit long)

10. How to set default value of combo box to value of record in database

11. Checking in Err Collection using On Error Resume Next

12. Spliting a record into many records based on its value

 

 
Powered by phpBB® Forum Software