SeekNext?

R

Ronald

Hi.

I have an index in a table that is not unique.
Is it possible to find all occurences using Seek? Or is Seek just used to
find if a key does exist yes or no. In that case, what is the advantage of
using Seek above FindFirst?
Thanks in advance,

Ronald.
 
S

Stefan Hoffmann

hi Roland,
.Index = "NA" '= first char of both fields
.Seek "=", "020", "1234567"
Do While (.NoMatch = False)
MsgBox "Found"
.Seek "=", "020", "1234567"
Loop
This code will loop if the key is found because the second Seek starts at
the beginning of the index.
Can you provide a complete example? An ADODB.Recordset has neither a
NoMatch nor the parameters you're using.

mfG
--> stefan <--
 
S

Stefan Hoffmann

hi Roland,
That code is the core part, but I use the DAO library.
hmm, it's an newsgroup about ADO...

From the OH:
--
If the index identifies a nonunique key field, Seek locates the first
record that satisfies the criteria.
--

So you can't use it to locate all matching records.

mfG
--> stefan <--
 
R

Ronald

Hi Stefan.

Sorry but here it says: Modules DAO VBA ADO.

But if Help says: no can do, then I will put another question in Modules
Coding.

Thanks for your effort,

Ronald.
 
S

Stefan Hoffmann

hi Ronald,
Sorry but here it says: Modules DAO VBA ADO.
Don't take my advice in this case to serious, cause the name is not as
precise as it code be:

microsoft.public.access.modulesdaovba.ado

But if Help says: no can do, then I will put another question in Modules
Coding.
Staying in a thread is always the better method...


mfG
--> stefan <--
 

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

Top