Let me give you an example, maybe that will help.
Example:
RecNo = 5
FileRec = 8
Refdes = <$-FG71>
AssemRec = 0
This will match another record:
RecNo = 58
FileRec = 8 (Same FileRec, this must match)
RefDes = FG71 (This also matches because it matches the above example
after the above is stripped of <$->)
AssemRec = 5 (Since it matches the FileRec and RefDes of the above, I
will paste the above RecNo in this field)
Hope that helps
OK. This may or may not be an updateable query. Is there a unique index on
RefDes? If so that will help a lot:
UPDATE tablename AS A
INNER JOIN tablename AS B
ON A.Refdes = "<$-" & B.RefDes & ">"
AND A.FileRec = B.FileRec
SET A.AssemRec = B.RecNo;
If the query isn't updateable try
UPDATE tablename
SET AssemRec =
DLookUp("RecNo", "tablename", "[RefDes] = '" & Mid([RefDes], 4, 4) & "' AND
[FileRec] = " & [FileRec])
WHERE AssemRec IS NULL;