可以在datasource 的 ondatachange事件中检查.
解决方案 »
- TCP/IP编程,使用indy组件还是Internet面板上的组件,还是直接用winsocket呢?
- 三层结构中,怎么通过文件流往数据库中存储附件(jpg,bmp等)??????????
- 请教一个非常简单的问题
- 请问使用fastreport如何在一行中打印多列数据?
- 什么函数可以返回一个文本文件的行数吗?
- 对于delphi对数据库操作的疑问
- 我写的一个小程序,有些小小的问题,求助大家了,给分决不食言
- delphi中ADO连接DBF的问题
- 在没有安装Delphi 和installshield的计算机上安装完毕一个DElphi程序,运行程序时没错,当打开数据文件时却出现以下错误:“An error occ
- Delphi 现有的控件好象处理不了大数据库啊
- 各位指教!有关frame的问题?急!
- 在线等待兄弟们帮忙!!!!!!100分拱手相让
Field: TField);
begin
with ado_archives do
begin
open;
if bof then
begin
frm_archives.toolbutton1.enabled:=false;
frm_archives.ToolButton2.enabled:=true; end;
end;
end;end.报错为:use step or run to continue
Field: TField);
begin
with ado_archives do
begin
open;
if bof then
begin
frm_archives.toolbutton1.enabled:=false;
frm_archives.ToolButton2.enabled:=true; end;
end;
end;end.报错为:use step or run to continue
procedure TDataModule1.Data_archivesDataChange(Sender: TObject;
Field: TField);
begin
with ado_archives do
begin
if bof then
begin
frm_archives.toolbutton1.enabled:=false;
frm_archives.ToolButton2.enabled:=true;
end;
end;
end;end.报错为:use step or run to continue
.....
with ado_archives do
begin
close;
try
if bof then
...
except
....
其它的与这条语句类似
procedure TForm1.Table1AfterScroll(DataSet: TDataSet);
begin
Previous.Enabled:=Not Table1.Bof ;//Previous为向前的ToolButton名
Next.Enabled :=Not Table1.Eof ;//Next 为向后的ToolButton名
end;
Field: TField);
begin
with ado_archives do
begin
open;
if bof then
begin
frm_archives.toolbutton1.enabled:=false;
frm_archives.ToolButton2.enabled:=true; end;
end;
end;end.各位大侠,我按你们说做了,但都报错。我想可能是我没解释清楚的原因frm_archives是一个子窗体,
而我在frm_main主窗体中定义了一个m_OldForm
{ Private declarations }
m_OldForm: TForm;
我是在主窗口中调用子窗口。代码如下:
procedure Tfrm_main.TreeView1Click(Sender: TObject);
begin if m_OldForm <> nil then FreeAndNil(m_OldForm);
if TreeView1.Selected.Text = '人事档案完整资料' then
begin
m_OldForm := Tfrm_archives.Create(Nil);
m_OldForm.Show; //此行也可省略,MDI子窗体建立后就会自动显示
end else
if treeview1.Selected.text='人事合同管理' then
begin
m_oldform:=tform.Create(nil);
m_oldform.show;
end;
end;可现在我想在子窗口判断移动记录时,它老说:我的frm_archives的子窗体为空。也就是说下面这句代码。frm_archives.toolbutton1.enabled:=false;请各位前辈教我啊
受影响按钮的Enabled状态。