Ken,
If I take the LOCATE FOR out (also tried it with a scan) it seems to work. I can only think the locate/scan returns a value that conflicts with the return value of the rest of the code. I don't know of a way to check for the ID without searching the table.
>Is there a possibilty that you have code elsewhere (in another event of the textbox maybe?) that may be causing this?
Jim Philippi
quando omni flunkus moritati