Re: A2K - help with array search



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 ***
.



Relevant Pages

  • Re: Whats wrong the the logic in this code?
    ... Jeff Gardner wrote: ... I am attempting to get conditional output based on POSTed form data. ... $states = array( ... This ends up populating $search with multiple strings from the array. ...
    (comp.lang.php)
  • Re: Hash tables to look up data in an array?
    ... Populate the collection when you're populating the array. ... > Although this is working for me ok, I've read that hash tables are MUCH ... > faster and more efficient (less CPU time?) to do the same thing, ...
    (microsoft.public.vb.general.discussion)
  • Re: Populating a dropdown list with an Array
    ... > I am using data from a separate worksheet as a look-up for> the data entry on a primary sheet. ... Determining the indeterminate range of values and> loading it in the array may give me some difficultly -> suggestions or where to look would be appreciated. ... > I found an example of populating a User's Form listbox on> the support page, but I am not certain it is a possibility. ...
    (microsoft.public.excel.programming)
  • Re: list box with items for deletion passed from php array
    ... I want to display a list box that contains the elements from an array ... (queried from database). ... It seems to me the functions for populating ... // $options is the php array queried from database ...
    (comp.lang.javascript)
  • DDE and scrolling
    ... populating each next lower row with the latest data. ... other words the column length is constantly increasing. ... The application sets up an array to a requested size (of N ... where the newest data is written to the bottom row and the ...
    (microsoft.public.excel.programming)

Loading