Hi everybody !
Here is my problem. I have a form with a DBLookupComboBox and DBGrid. In the same program I have a DataModule with one table and one datasourse. All the properties of this components are properly (I think) set.
I have 2 simple procedures:
procedure SetOrderFilter(sRegionCode : String);
begin
With DataModule2.Table1 do
begin
Filter := 'RegionCode=' + sRegionCode;
Filtered := True;
end;
end;
procedure TForm1.DBLookupComboBox1CloseUp(Sender: TObject);
begin
if DBLookupComboBox1.Text <> '' then
begin
SetOrderFilter(DBLookupComboBox1.Text);
With DataModule2.Table1 do
Active := False;
end //if
end;
When I run the program and choose a field form the
DBLookupComboBox1 I get the message:
"Table1: Field 'N' not found" or Field 'S' etc...
My table has fields N, S, W, E etc.
What is wrong ???
Thanx in advance!!!
Here is my problem. I have a form with a DBLookupComboBox and DBGrid. In the same program I have a DataModule with one table and one datasourse. All the properties of this components are properly (I think) set.
I have 2 simple procedures:
procedure SetOrderFilter(sRegionCode : String);
begin
With DataModule2.Table1 do
begin
Filter := 'RegionCode=' + sRegionCode;
Filtered := True;
end;
end;
procedure TForm1.DBLookupComboBox1CloseUp(Sender: TObject);
begin
if DBLookupComboBox1.Text <> '' then
begin
SetOrderFilter(DBLookupComboBox1.Text);
With DataModule2.Table1 do
Active := False;
end //if
end;
When I run the program and choose a field form the
DBLookupComboBox1 I get the message:
"Table1: Field 'N' not found" or Field 'S' etc...
My table has fields N, S, W, E etc.
What is wrong ???
Thanx in advance!!!