Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL Database Query

Author  Topic 

topgair
Starting Member

1 Post

Posted - 2011-09-07 : 04:31:04
On the form, I created 3 textbox to write the ‘Investment sectors’ in (named: combo 8, combo 10 and combo 12). The macro that I am supposed to run is a search query. The search to be performed is to find all the records in the table that match the investment sector. Ie. The table has a field ‘investment sectors’ and I want to search for clients who fall with in the search sectors. After creating the text box, I have created a button, where the macro will be for the search action to be performed. In the macro I started with the open table command, and the next command is the SearchforRecord, I need help with the where condition part of this which is the expression building.

So basically my where condition should be like search the investment sector in the table client where the investment sector= combo 8 or combo 10 or combo12. Please help me in forming the where condition expression.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-09-07 : 05:05:45
capture combo values in three variables and use like
where [investment sector] in (@combo8,@combo10,@combo12)


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -