procedure TForm5.FormShow(Sender: TObject); begin orderdata.qx.Active := false ; orderdata.qx.Active := true ; end ; procedure TForm5.Edit2KeyPress(Sender: TObject; var Key: Char); begin if key =#13 then begin orderdata.qx.IndexFieldNames :='用户名' ; orderdata.qx.SetKey ; if orderdata.qx.FindKey([edit1.text]) then begin if orderdata.qx.FieldByName('密码').AsString =edit2.Text then begin ........... .......procedure TForm5.FormClose(Sender: TObject; var Action: TCloseAction); beginaction:= cafree ; end; 然后form5 ,再次加载的时候出错了,,出错了,再次加载又好了 FORM5是子窗体,,然后父窗体退出的时候,也出错,,,, 但是,如果在程序直接运行,马上退出不出错,,如果用FORM5的登陆窗口登陆后,程序退出就出错!!!!我实验了,好像,,就是跟 TABLE有关,,,TABLE.ACTIVE:=FALSE ;TABEL.ACTIVE:=TRUE,不可以重复运行吗???在ACCSESS里面没有错误
begin
orderdata.qx.Active := false ;
orderdata.qx.Active := true ;
end ;
procedure TForm5.Edit2KeyPress(Sender: TObject; var Key: Char);
begin
if key =#13 then
begin
orderdata.qx.IndexFieldNames :='用户名' ;
orderdata.qx.SetKey ;
if orderdata.qx.FindKey([edit1.text]) then
begin
if orderdata.qx.FieldByName('密码').AsString =edit2.Text then
begin
...........
.......procedure TForm5.FormClose(Sender: TObject; var Action: TCloseAction);
beginaction:= cafree ;
end;
然后form5 ,再次加载的时候出错了,,出错了,再次加载又好了
FORM5是子窗体,,然后父窗体退出的时候,也出错,,,,
但是,如果在程序直接运行,马上退出不出错,,如果用FORM5的登陆窗口登陆后,程序退出就出错!!!!我实验了,好像,,就是跟 TABLE有关,,,TABLE.ACTIVE:=FALSE ;TABEL.ACTIVE:=TRUE,不可以重复运行吗???在ACCSESS里面没有错误