Query a field with more than one record?

K

Kou Vang

Currently I use a Dlookup function to give me a field from a table. How do I
get say, the second record of that field? When I use the Dlookup in the or:
slot below the field, it still only queries based on the first record.

DLookUp("[NextCount]","[CYQueryTbl]","[NextCount]>0") (In Criteria: line)
DLookUp("[NextCount]","[CYQueryTbl]","[NextCount]>0") (In or: line)

Still only queries on first record. Is this even possible?
 
M

[MVP] S.Clark

I would do it with VBA.

dim strFirst as string
dim strSecond as string

strFirst = nz(dlookup(...),"")
if len(strFirst) > 0 then
strSecond = nz(dlookup(.., "Field <> " & strFirst),"")
end if
 
Top