Here's my problem:
Let's say I have these tables:
table1
1 - "a"
2 - "b"
table2
1 -
2 -
3 -
Now, I'm using the following code to compare the tables:
table2.MoveFirst
Do While Not table2.EOF
table1.Seek "=", table2!field2
If table1.NoMatch Then
go do a lot of things to find that information
Else
table2.Edit
table2!Field2 = table1!field2
table2.update
End If
table2.MoveNext
Loop
But the line
table2!Field2 = table1!field2
Is not working so well. I'm pretty sure I'm doing something wrong here, but I'm having problems finding a solution. I'm not even sure what I should google...
EDIT: Field 2 is indexed in table 1, so the 'seek' works.
A few notes.
Let us say you want all the records from Table2 where there is no match on a field called Field1:
You could, of course, build the query in the query design window and fiddle around until is is just what you want, then switch to SQL view to get the right (ish) SQL string.
Please treat the above as notes, not finished code.