You got fine answers, but nobody asked what is your SEEK doing?
What's idnam? Is it a field of Log.dbf?
What are you doing there? If idnam is no variable but a field it will be preferred, even if a variable of same name exists. So you'd seek to the record you're already on.
Do you want to seek to idnam value of another table? Then you have to specify that, i.e. SEEK othertable.idnam.
And if you want to use the SEEK function (there is a seek command and a seek function, both exist and you can choose) then also take the SEEK() function return value instead of using FOUND. The SEEK function returns .T. if it found a record and .F. if not, so you could do
Code:
IF SEEK(value)
REPLACE log with .f.
Endif
And then, you Select Log but want to REPLACE in Cnt.log, you don't select a field, you select a table/alisa/workarea, so it should be SELECT Cnt.
How can you do so many things wrong in so few lines?
Also, why do make 10 lines out of a single line of code?
Code:
Update Cnt Set Log = .f. Where idnam = something
That something has to come from somewhere else, I don't know from your code, but it surely isn't a field within Cnt itself. Because a clause like idnam=idnam is always true, no matter on which record you are, except when idnam would be NULL.
So, don't panic, focus, keep calm and really think about what you want to do and do that, don't guess what could be right, know what you want. We can't tell you what you want.. though.
Chriss