|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I am trying to set the ListField property of a DataCombo Control to a subset of values like in the code below. DataCombo2 should display in the ListField the "id" values that satisfy a certain condition (Where clause in the SQL statement) from the "id" column in the "Nadfmm" table. ...but it boesn't happen! the ListField is empty, WHY? PLEASE HELP ME. here is the code I have written so far: ================================= Dim SQLString As String Dim my_recordset As New ADODB.Recordset Dim my_connection As New ADODB.Connection Private Sub DataCombo1_Change() SQLString = "SELECT Nadfmm.id FROM Nadfmm WHERE Nadfmm.board = """ & Me.DataCombo1 & """" Set my_connection = New ADODB.Connection my_connection.ConnectionString = "Provider =Microsoft.Jet.OLEDB.3.51;Data Source=C:\Documents and Settings\icgR225\My Documents\nadfmm97.mdb;" my_connection.Open With my_recordset .Source = SQLString .CursorType = adOpenDynamic .CursorLocation = adUseServer .LockType = adLockOptimistic .ActiveConnection = my_connection .Open , , , , adCmdText End With Set Me.DataCombo2.RowSource = my_recordset Me.DataCombo2.ListField = "id" my_recordset.Close my_connection.Close End Sub |
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > can not set ListField poperty of a DataCombo control |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|