|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Combobox array
I have a 2 comboboxes that are used to select a Where clause in a query program. The first one recieves the information fine. I want the second combobox to duplicate what is in the first combobox. I created an array for the comboboxes.
When I compile, I recieve an compile error message saying: Procedure declaration does not match description of event or procedure having the same name. And takes me to this sub: Private Sub cboWhere_CloseUp() If Trim(cboWhere(0).Text) = "" Then lstIn.Clear txtWhereValue.Text = "" cboOperator.Text = "=" End If If Trim(cboWhere(1).Text) = "" Then txtWhereValueSecond.Text = "" cboOperatorSecond.Text = "=" End If ShowQuery End Sub This is the code I have that worked with the first combobox: Dim itm As ListItem Dim strTmp As String Dim intIndex As Integer Dim strSort As String Dim strGroup As String Dim blnFound As Boolean Dim varBookMark As Variant blnFound = False intIndex = 0 '----fill in the Where combo box With cboWhere '----save the current where column strTmp = .Text varBookMark = .Bookmark .RemoveAll .AddItem vbTab & vbTab & "-1" For Each itm In lvwSelectedFields.ListItems .AddItem itm.Text & vbTab & itm.ListSubItems.Item(FIELDCAPTION).Text & vbTab & itm.Index If itm.ListSubItems.Item(1).Text = strTmp Then blnFound = True End If Next itm '----restore the where column If strTmp <> "" Then If blnFound = False Then '.AddItem strTmp '.Text = strTmp 'Err.Clear '.ListIndex = .ListCount - 1 Else .Bookmark = varBookMark End If End If End With Thanks |
![]() |
| Viewing: Dev Articles Community Forums > Programming > .NET Development > Combobox array |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|