>>What do you mean by "for the first record only"? Are you expecting it to append several records? A not eof() loop won't help...because that function won't evaluate properly for the table you are appending from (at least I don't think it will).
>>
>Steve:
>
>I have two tables RefDocsAddy and RefDocsWithAddress.
>
>RefDocsAddy has the following fields: Number, Name, Speciality, City
>RefDoscWithAddress has the more fields in addtion to the fields in RefDocsAddy
>
>What I am trying to accomplish is, if there is a matching value in the Number fields of both tables, then I want RefDocsAddy.Speciality and RefDocsAddy.City to be inserted into RefDocsWithAddress.Speciality and RefDocsWithAddress.Location. Then move to the next record and if there is a match, do the same.
>
>Hope I am making sense. Thanks.
So,
This code may help you
LOCAL loRefDocsAddy
SET EXACT ON
IF !USED('RefDocsAddy') THEN
USE RefDocsAddy IN 0
ENDIF
IF !USED('RefDoscWithAddress') THEN
USE RefDoscWithAddress IN 0
ENDIF
SELECT RefDocsAddy
SCAN
SCATTER NAME loRefDocsAddy MEMO
SELECT RefDoscWithAddress
Locate For RefDoscWithAddress.Number = loRefDocsAddy.Number
IF Found() THEN
Replace Speciality WITH loRefDocsAddy.Speciality, Location WITH loRefDocsAddy.City
ENDIF
SELECT RefDocsAddy
ENDSCAN
Zlatin Zlatev,
MCSD (VS6)Make solutions, not programs!