我想在程序中实现这样一个功能:
1、在查询页按“增加”按钮,新增记录,
2、跳到资料编辑页,录入资料,保存,
3、回到查询页,指针定位到刚才新增的记录上。
前两个功能我已经实现了,但最后一个,写不出来,望高人指教。注意,是用intraweb控件。另外,怎么实现当页面刷新时,输入框中的光标会重新定位在开始位置上去,我看过bnPYSse写的《IntraWeb学习笔记(四)》,但会提示ComponentName.setFocus中Undeclared identifier: 'setFocus'。
谢谢大家。

解决方案 »

  1.   

    增加一个“新增时间“字段,来表示最新增加的纪录,
    当回到查询页面时,用select 语句搜索出刚才新增的纪录。
      

  2.   

    第一个问题我已经解决,只要在hit之前让dataset再查一次就行,如下:  DM._CurFocusLogo:=EdmLogoCode.Text;
      SQuery:=format('select l.*,c.name as name,d.dic as dic from hzlk_logo as l,CUST as c,hzlk_dic as d where l.BelCus=c.CUS_NO and l.BelSen=d.SubType and l.LogoCode=''%s'' order by l.LogoName',[DM._CurFocusLogo]);
      with DM do
      begin
        BetterADODataSet1.Active :=false ;
        BetterADODataSet1.CommandText :=SQuery;
        BetterADODataSet1.Active := True;
      end;第二个问题有谁能帮我解决吗?