|
-
Oct 28th, 2009, 12:31 PM
#1
Thread Starter
PowerPoster
[RESOLVED] Invalid property value matching 2 combo boxes
I am matching 2 combo box indexes
Some of my users are getting a Invalid property value in this procedure, Why?
Code:
If frmMain.cboPitch.ListIndex <> -1 Or frmMain.cboPitch.Text <> "" Then
Me.cboPitch.ListIndex = frmMain.cboPitch.ListIndex
End If
Waiting for a full featured smart phone with out marrying a provider
Go Android
Go raiders 
-
Oct 28th, 2009, 01:02 PM
#2
Re: Invalid property value matching 2 combo boxes
If frmMain.cboPitch has more entries than Me.cboPitch, that error is very possible.
You may want to double check the ListCounts of both of those comboboxes. Otherwise, I don't think we have all the details, like where do the combo box entries come from, for both of the combo boxes.
-
Oct 28th, 2009, 01:38 PM
#3
Thread Starter
PowerPoster
Re: Invalid property value matching 2 combo boxes
 Originally Posted by LaVolpe
If frmMain.cboPitch has more entries than Me.cboPitch, that error is very possible.
You may want to double check the ListCounts of both of those comboboxes. Otherwise, I don't think we have all the details, like where do the combo box entries come from, for both of the combo boxes.
Thanks
You are right, the list counts are different. I had entered a routine a couple yrs ago for this:
Code:
Public Sub MatchCboIndexes()
10 On Error GoTo e
20 Select Case Me.cboPitch.ListIndex
Case 0
30 frmNewPricePerSq.cboPitch.ListIndex = Me.cboPitch.ListIndex
40 Case 1 To 8
50 frmNewPricePerSq.cboPitch.ListIndex = Me.cboPitch.ListIndex + 2 'gPitchIndex + 2
60 Case 9
70 frmNewPricePerSq.cboPitch.ListIndex = Me.cboPitch.ListIndex + 3 'gPitchIndex + 3
80 Case Is > 9
90 frmNewPricePerSq.cboPitch.ListIndex = 13
100 End Select
110
120 Exit Sub
Must have the problem routine later, without noticing
Waiting for a full featured smart phone with out marrying a provider
Go Android
Go raiders 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|