if LCb1.text<>'' then begin
jh_fpb1.adoquery2.sql.clear;
jh_fpb1.adoquery2.sql.text:='SELECT jh_zb.jh_code, jh_zb.gc_name,'
+'jh_zb.zj_kind, jh_zb.xm_code, jh_zb.ys_bank, jh_zb.jh_data,'
+'jh_zb.dw_uint, jh_zb.pz_file, jh_zb.bb_unit, jh_zb.jb_person,'
+'jh_zb.bz_data, jh_zb.bz_memo, jh_fb.sb_code, jh_fb.sb_name,'
+'jh_fb.gg_type,jh_fb.jl_unit, jh_fb.sl_amount, jh_fb.dj_price,'
+'jh_fb.je_sum, jh_fb.gh_unit, jh_fb.jh_person, jh_fb.bz_memo1'
+' FROM jh_zb LEFT JOIN jh_fb ON jh_zb.jh_code = jh_fb.jh_code'
+' where jh_zb.code='''E1.text + ''' and jh_fb.jh_person='''+lcb1.text+''' order by jh_fb.sb_code ASC';
jh_fpb1.adoquery2.open;
如果字段类型为数值类型则去掉单引号
不好意思,,因为这里要分行写了,所以忘了加引号
改正如上。。