Re: ADO FIND question

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Brendan Reynolds (brenreyn)
Date: 10/13/04


Date: Wed, 13 Oct 2004 15:48:50 +0100

A primary key is an index.

I'm not sure that I understand the rest of your question. How is your code
supposed to know that the last record to match your criteria is the last
record without searching the remaining records? If you have ten records, and
records 3, 5 and 7 match your criteria, how is your code to know that record
7 is the last match without examining 8, 9 and 10, regardless of whether
there is an index or not? Or am I misunderstanding the question?

-- 
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com
The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
"Dennis" <Dennis@discussions.microsoft.com> wrote in message 
news:1EBB570A-824C-4B70-90C0-9F2A8D5FF92B@microsoft.com...
>I have a VB program accessing non-indexed tables (by primary key). I'm 
>using
> the RECORDSET.OPEN / RECORDSET.FIND syntax, coupled with 
> RECORDSET.MOVENEXT.
>
> I would like to be able to stop the quesry when the last record with my
> specified value is found. How can I do that when the field I'm using is 
> not
> indexed (even though it's a key field)?
>
> Any insight would be appreciated.
>
> Thanks! 


Relevant Pages

  • Re: returning to a new record in main form from subform
    ... out, and came up with this: on the subsubform command button's Click event, ... >>> only one record for each sale in tblSale and one record of the contact ... >> the primary key field of tblLeads will be directly linked to the primary ...
    (microsoft.public.access.modulesdaovba)
  • RE: not in list
    ... started using dmax in the forms to similate autonumber. ... key field doesn't get filled in and therefore no record is created. ... is there a way to force the number into the table for the primary key? ... > Else: Response = acDataErrContinue ...
    (microsoft.public.access.forms)
  • Re: Linking 2 Subforms To Display Only Current Record
    ... and tblSuppliers has a foreign key field also named IDPartNo ... IDSupplier is the primary key field of tblSuppliers ... and i'll call the subform control "ChildSuppliers". ... >>> Chemicals have many Suppliers and each Supplier has many MSDSDocs. ...
    (microsoft.public.access.formscoding)
  • RE: Bound Fields
    ... the Personnel table in the Annual Training Summary table. ... I would suggest an Autonumber field. ... This technique is known as an Artificial Primary key. ... of the Autonumber primary key field in the Personnel table that relates to ...
    (microsoft.public.access.forms)
  • RE: Bound Fields
    ... the Personnel table in the Annual Training Summary table. ... I would suggest an Autonumber field. ... This technique is known as an Artificial Primary key. ... of the Autonumber primary key field in the Personnel table that relates to ...
    (microsoft.public.access.forms)