vfp按学号查询的容错处理

图片说明
希望实现的功能:若输入的学号不正确则提示输入错误。
请大佬帮我看看这里为什么错了。非常感谢!

https://zhidao.baidu.com/question/557081013.html

select views
go top
locate for allt(学号)==allt(thisform.pageframe.page1.text1.value)
if !found()
messagebox("学号错误!",64,"提示")
endif