.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old June 15th, 2005, 03:07 PM
zombie_man23 zombie_man23 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 22 zombie_man23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 16 m
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgramming.NET Development > Combobox array


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT