代码如下, 是一个登录界面! 我觉得and应该换成or,尾和头能共存吗?不懂!
procedure TdlForm.Label4Click(Sender: TObject);
begin
if data1.stateb.eof and data1.stateb.bof then
begin
if DirectoryExists('c:\xjb\dbf\'+trim(rqcombobox.text)) then
begin
sjrq:=trim(rqcombobox.text);
data1.b.active:=false;
data1.b.databasename:='c:\xjb\dbf\'+sjrq;
dlform.Visible:=false;
mainform.showmodal;
end
else
showmessage('该月数据不存在,请检查!');
end
else
begin
if trim(rqcombobox.text)='' then
showmessage('请选择数据日期')
else
begin
if DirectoryExists('c:\xjb\dbf\'+trim(rqcombobox.text)) then
begin
sjrq:=trim(rqcombobox.text);
data1.b.active:=false;
data1.b.databasename:='c:\xjb\dbf\'+sjrq;
dlform.Visible:=false;
mainform.showmodal;
end
else
showmessage('该月数据不存在,请检查!');
end
end;end;
procedure TdlForm.Label4Click(Sender: TObject);
begin
if data1.stateb.eof and data1.stateb.bof then
begin
if DirectoryExists('c:\xjb\dbf\'+trim(rqcombobox.text)) then
begin
sjrq:=trim(rqcombobox.text);
data1.b.active:=false;
data1.b.databasename:='c:\xjb\dbf\'+sjrq;
dlform.Visible:=false;
mainform.showmodal;
end
else
showmessage('该月数据不存在,请检查!');
end
else
begin
if trim(rqcombobox.text)='' then
showmessage('请选择数据日期')
else
begin
if DirectoryExists('c:\xjb\dbf\'+trim(rqcombobox.text)) then
begin
sjrq:=trim(rqcombobox.text);
data1.b.active:=false;
data1.b.databasename:='c:\xjb\dbf\'+sjrq;
dlform.Visible:=false;
mainform.showmodal;
end
else
showmessage('该月数据不存在,请检查!');
end
end;end;
解决方案 »
- TIdFTP获取某个文件创建,修改时间
- DEPHI DLL 动态连接 ---四句代码,代价是一个通宵
- TWebBrowser的IPersistFile.Save,如何得知它已保存完成﹖
- dll中如何调用主叫程序中的一些事件?
- delphi7 里打开带密码的access数据库时出现工作组信息文件丢失信息,请高手指点?
- 请问 怎么把一个程序 放在我的程序中使用?
- 如何制作启动窗口!!象优化大师启动的时候显示的一样!!
- 这样的进度条怎么用?
- 如何用delphi连接远程mssql数据库?
- 已知外部应用程序的窗口句柄,如何能得到窗口内所有图型按钮的句柄和名称??
- 请问:isnumeric函数怎么用?
- TdateTimePicker(Components[1]).OnEnter:=DateTimePickerEnter;有何功能???
如果bof和eof同时为真说明记录条数为0
既是bof也是eof,表示表中无符合条件的记录
用
if data1.stateb.eof then
begin
end;
效果一样trim用作去掉字符串两边的空格