'Manipulate the Combobox's properties and show the form. 'Populate the array with the whole recordset. ActiveConnection = Nothing 'Disconnect the recordset. 'Instantiate the Recordsetobject and execute the SQL-state. CursorLocation = adUseClient 'Necesary for creating disconnected recordset. StSQL = "SELECT Region FROM Region_Mapping" StConn = "Provider=SQLOLEDB.1 Integrated Security=SSPI Persist Security Info=False Initial Catalog=sap_data Data Source=DB-77716EFB0313\SQLEXPRESS" It should take only one instance of each region.ģ) As mentioned earlier I want to add a list box to my userform which will get populated on the basis of the value which i had selected in my combo box for example If I select America in my combo box my list box should get populated with the countries which are mapped against America in my sql server table and they should get populated with check boxes in listbox.ĭim stDB As String, stConn As String, stSQL As String America is reflecting 4 times in my combo dropdown same in case of other regions. ![]() Following are things which I am looking for :ġ) While establishing connection to sql server database I want to enter User ID and password in my code.Ģ) My Combobox gets populate with the data but it shows all instances of each region.
0 Comments
Leave a Reply. |