I have a TDBLookUpListBox on my form.  I am populating it with a TMyQuery->SQL= "SELECT * FROM Site_ID"   initially from the designer.
Now if a user wants to narrow the items in the TDBLookUpListBox how do you go about it?
I have been trying to change the SQL statment like this:
MyQuery_Site_ID->SQL->Text ="SELECT * FROM Site_ID WHERE Version_Inv = 1";
But this raises a exception.
Thanks.
			
									
									
						tmyqury and a dblookuplistbox
- 
				alan
 
I found out what was going on.
When you programatically change the SQL text it sets the MyQuery->Active = false. Also it calls the OnChange event on the TDBLookUpListBox which tried to update a bunch of data-aware components which all threw exceptions because MyQuery->Active was false.
I did a workaround and its running now.
			
									
									
						When you programatically change the SQL text it sets the MyQuery->Active = false. Also it calls the OnChange event on the TDBLookUpListBox which tried to update a bunch of data-aware components which all threw exceptions because MyQuery->Active was false.
I did a workaround and its running now.