Hi zh3ntil, your suggestion is working fine for me! thank you! but there's another special case comes in, in my table, there are some record but with spacing as value. hence, if i use the (select count(*) ... where ...) as checkfield, which seems not applicable anymore since there's record selected. so how can i control it in this case? your help is much appreciated.