Re: A2K - help with array search



Rich P wrote:
How is the 2D array being populated? What is the data source of the
2D array? Instead of populating a 2D array you should populate
another temp table. Then you can use DLookUp to see if your field
exists in the one table in the other table like this:

tbl1 is your main table, tbl2 is what used to be the 2D array

Dim DB As DAO.Database, RS As DAO.Recordset
Dim str1 As Variant
Set DB = CurrentDB
Set RS = DB.OpenRecordset("tbl1")
Do While Not RS.EOF
str1 = _
& DLookUp("fldz", "tbl2", "fldz = '" & RS!fldx & "'")
If IsNull(str1) Then MsgBox RS!flx & " is not in tbl2"
RS.MoveNext
Loop



Rich

*** Sent via Developersdex http://www.developersdex.com ***

Cheers Rich, I think you're right about that or I could tag the records in
some way. Trying to look up values in an array seems impossible.


.



Relevant Pages

  • Re: overload array index operator
    ... way in Fortran to collapse a 2 dimensional array into one ... dimension that way you want to. ... it with vector valued subscripts, ... > Rich Townsend wrote: ...
    (comp.lang.fortran)
  • Re: I keep getting this error in in_array. Any ideas why?
    ... rich wrote: ... $getQ="SELECT primsecid FROM li_dresstypepsp ... Then I do a compare using in Array. ... making sure I have something in the array with the is sizeof statement. ...
    (comp.lang.php)
  • Re: A2K - help with array search
    ... How is the 2D array being populated? ... Instead of populating a 2D array you should populate another ... temp table. ... Dim str1 As Variant ...
    (comp.databases.ms-access)
  • Re: Filling an array from a table
    ... Rich J wrote: ... The table contains only dates and I already have all the code I need to compare the dates but don't know how to load the array from the table. ... replace the queue with a tea ...
    (microsoft.public.access.modulesdaovba)
  • Working with RichTextBox
    ... bunch of text files and parses them into an array of a custom class type. ... As the user selects a row in the datagrid, the rich text box displays the ... could use regex to replace the above color codes with an RTF code ?? ...
    (microsoft.public.dotnet.languages.csharp)

Loading