当前位置: 代码迷 >> VFP >> 找不到字别名“fahuobiao”,该怎么处理
  详细解决方案

找不到字别名“fahuobiao”,该怎么处理

热度:877   发布时间:2013-02-26 00:00:00.0
找不到字别名“fahuobiao”
sele fahuobiao
set safe off
set exact on
num=1
do while num<=5
  xh=alltrim(str(num))
  chk&xh.=thisform.check&xh..value
  num=num+1
enddo
if chk1=0.and.chk2=0.and.chk3=0.and.chk4=0.and.chk5=0
  =messagebox("您没有选择确定查询条件,还不能进行查询!",0,"系统提示")
  return
endif
do case
  case chk1=1
  textnr1=alltrim(thisform.txt1.value)
  if len(textnr1)=0
  =messagebox("请输入要查询的货物名称!",0,"系统提示")
  return
  thisform.txt1.setfocus
  endif
  sele * from fahuobiao where alltrim(fahuobiao.货物名称)==textnr1 into table &lsfile
  case chk2=1
  textnr2=alltrim(thisform.txt2.value)
  if len(textnr2)=0
  =messagebox("请输入要查询的运单号!",0,"系统提示")
  return
  thisform.txt2.setfocus
  endif
  sele * from fahuobiao where alltrim(fahuobiao.运单号)==textnr2 into table &lsfile
  case chk3=1
  textnr3=alltrim(thisform.txt3.value)
  if len(textnr3)=0
  =messagebox("请输入要查询的货柜号码!",0,"系统提示")
  return
  thisform.txt3.setfocus
  endif
  sele * from fahuobiao where alltrim(fahuobiao.货柜号码)==textnr3 into table &lsfile
  case chk4=1
  textnr4=alltrim(thisform.txt4.value)
  if len(textnr4)=0
  =messagebox("请输入要查询的封条号码!",0,"系统提示")
  return
  thisform.txt4.setfocus
  endif
  sele * from fahuobiao where alltrim(fahuobiao.封条号码)==textnr4 into table &lsfile
   
  case chk5=1
  textnr5=thisform.txt5.value
  textnr6=thisform.txt6.value
  tx5=len(alltrim(dtoc(textnr5,1)))
  tx6=len(alltrim(dtoc(textnr6,1)))
  if tx5=0.or.tx6=0.or.textnr5>textnr6
  =messagebox("请输入正确的发货日期的下限和上限!",0,"系统提示")
  return
  thisform.txt5.setfocus
  endif
  sele * from fahuobiao where fahuobiao.发货日期>=textnr5 .and. 发货日期<=textnr6 into table &lsfile  
endcase
set safe on
do form fahuocxjg

------解决方案--------------------------------------------------------
如果是第一句
sele fahuobiao
报错,那在此句前加如下代码
if !used('fahuobiao')
use fahuobiao in 0
endif