Update a table based on criteria set between two table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dauntless P
    New Member
    • Feb 2012
    • 1

    #1

    Update a table based on criteria set between two table

    I am very new to VBA. I need to be able to write a function that relates two tables based on a UI. The relationship between the two tables is a many to many relationship, so I have a 3rd table with no duplicates of the UI. I then want be able to identify a record in Table 2 by apply the following criteria: table1![depth1]>= table2![depth1] AND table1![depth2]<= table2![depth2]. Then I want to update the table1![Name] with table2![Name]. When I have tried to do this with a simple query and outer joins I get a blank value for every record in Table2. I think I need something that will loop throught the records of table2 until the criteria is true then update the Name field in table1.
    I hope I have been clear as to what it is I want.

    thanks,
    Dauntless
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32669

    #2
    The explanation is not too clear and very little supporting info is included. Could you please include the SQL of your attempt. This may give us some of the info lacking from the question, and maybe a line into how you're thinking.

    Comment

    Working...