undeclared indentifier:'values'的问题,请教(100)

  • 主题发起人 主题发起人 yedixifeng
  • 开始时间 开始时间
Y

yedixifeng

Unregistered / Unconfirmed
GUEST, unregistred user!
运行时出现undeclared indentifier:'values',不知道问题出在哪,请指教。代码如下:procedure TfrmDlgSQFind.ClickOK;begin FWhlSql := 'a.ValidDate between ' +''''+FormatDateTime('yyyy-mm-dd',edtBeginDate.Date)+'''' +' and '+''''+FormatDateTime('yyyy-mm-dd',edtEndDate.Date)+' 23:59:59'+''''; if edtCustomerID.ItemIndex > 0 then begin FWhlSql := FWhlSql+' and a.CustomerID='+'''' +edtCustomerID.Values.Strings[edtCustomerID.ItemIndex]+''''; end; if Trim(edtMtext.Text) <> '' then begin FWhlSql := FWhlSql+' and a.Mtext like '+''''+'%'+Trim(edtMtext.Text)+'%'+''''; end; inherited; end;procedure TfrmDlgSQFind.SetCustomerItems;var Sql: string;begin Sql := 'select CustomerID,CustomerName,ShortName' +' from BasCustomer' +' where Status=1'; if G_JYStyle in [4,5,6,9] then begin Sql := Sql + ' and 1=1'; end else begin Sql := Sql + ' and 1=2'; end; Sql := Sql+' order by CustomerID'; G_OpenSQL(Sql,ads); with ads,edtCustomerID do begin Items.Clear; Values.Clear; Items.Add('全部'); Values.Add(''); First; while not Eof do begin Items.Add(FieldByName('ShortName').AsString); Values.Add(FieldByName('CustomerID').AsString); Next; end; ItemIndex := 0; end;end;procedure TfrmDlgSQFind.btnSelectCustomerClick(Sender: TObject);var CustomerID: string;begin inherited; CustomerID := frmMain.SelectCustomer; if Trim(CustomerID) = '' then exit; edtCustomerID.ItemIndex := edtCustomerID.Values.IndexOf(CustomerID);end;
 
运行时,哪个地方的values出问题呢?
 
呵呵 谢谢,是控件装的版本的问题。分给你吧。
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
497
import
I
后退
顶部