Q: Finding Records

From: Geoff Jones (nodamnspam_at_email.com)
Date: 01/25/05


Date: Tue, 25 Jan 2005 14:31:23 -0000

Hi

Can anybody give me some advice on the following?

Suppose I have two tables: A and B. There is a one to many relationship
between A and B. I would like to find all the child rows in B for a given
row in A. Then, from these returned rows, I would like to find all the rows
which satisfy a given criteria.

With me so far? :)

I know how to create a relationship between A and B, and have been able to
get the child rows. However, the only way I can think to find the rows in
the last step is to go through every row and check the criteria to see if it
is satisfied:

For Each row As DataRow In ChildRowsReturnedByRelationship
    If row.Item("Name") = "Geoff" Then
        ' Do something
    EndIf
Next

which works for me but I don't feel it is as good or efficient as it could
be.

I know that for a DataTable, you can use something like "FindRows". Is there
an equivalent I could use for some returned rows e.g. something like:

ChildRowsReturnedByRelationship.FindRows("Geoff")

???

Thanks in advance

Geoff

 



Relevant Pages

  • RE: Producing an automated list from a larger list
    ... When the item is moved to the bottom of the list because it does not satisfy ... the criteria it produces an error of #NUM!. ... "Chuckee" wrote: ...
    (microsoft.public.excel.worksheet.functions)
  • Record Source
    ... the form because it doesn't satisfy the criteria in the underlying record ... Then the Form_After Update event doesn't run. ... I presume this is a timing problem of some sort where ...
    (microsoft.public.access.formscoding)
  • Re: Queries involving subforms
    ... I don't want the query to return any child rows, only parent rows, but based ... indicate a particular parent row. ... is there anyway to base the criteria for a query ...
    (microsoft.public.access.queries)
  • Re: Experimental disproof of the theory of Relativity
    ... >> I didn't see much point in you wasting time ... >> finding references to try and satisfy some criteria that is designed ...
    (sci.physics.relativity)
  • Re: Merging beans for composite search
    ... So your bean "walks" the leaves of the criteria tree in order of boolean products and evaluates each product's criterion against the People in hand. ... IOW, the classic query problem ... that satisfy that criteria. ... evaluate any such compound criteria against the target instances. ...
    (comp.object)