DLookup in a Query

ListO

Señor Member
Local time
Today, 17:29
Joined
Feb 2, 2000
Messages
167
Hi, All...

What is the protocol for returning a field of a particular record number in a query?

I would like to pull up the field like this:

For X = 1 to DCount(queryname)

myString = DLookup([fieldname],queryname, "recordnumber =" X)

'mess around with that data for a bit

Next X

I just can't figure out how to reference it if the criteria is simply the record number in that query.

Thanks so much.

-Curt
 
If what you are trying to do is to process a recordset in code, DLookup() is not a good method for a lot of reasons. Look up movenext in help or in this formum's archives for sample code that loops through a recordset.

FYI, relational tables do not have permanent "record numbers" as ISAM files do.
 

Users who are viewing this thread

Back
Top Bottom