|  | 
| Type control mismatch | 
| Post Reply   | 
| Author | |
| denny.holl@yahoo.com   Newbie     Joined: 26 September 2012 Location: Indonesia Status: Offline Points: 1 |  Post Options  Thanks(0)  Quote  Reply  Topic: Type control mismatch Posted: 26 September 2012 at 6:06am | 
| 
   I'm having difficulty when try to fill codejock combobox this way: Public Function fillcombo(ByRef combo As ComboBox, strQuery As String, field As Integer) as boolean If conAdo.State = adStateOpen Then rstAdo.Open strQuery, conAdo End If If rstAdo.EOF = False Then rstAdo.MoveFirst combo.Clear Do combo.AddItem (rstAdo.Fields(field)) rstAdo.MoveNext Loop Until rstAdo.EOF = True End If End Function When i call it for example: fillcombo(combo1, "select * from something", 1) It said: 13 Type mismatch Is it something to do with the same type control of vb combobox ? Any help would be appreciated. | |
|  | |
| justzain   Newbie   Joined: 07 May 2012 Status: Offline Points: 2 |  Post Options  Thanks(0)  Quote  Reply  Posted: 13 October 2012 at 4:00am | 
| Try This Amended Code it works for you:- Option Explicit | |
|  | |
| Xander75   Senior Member     Joined: 26 April 2007 Status: Offline Points: 353 |  Post Options  Thanks(0)  Quote  Reply  Posted: 06 November 2012 at 4:41am | 
| 
   You are using "ByRef combo As ComboBox", which is why you are getting the Type Mismatch! It is expecting the VB.Combobox and you are passing the Codejock Combobox. Instead use the following: "ByRef combo As XtremeSuiteControls.ComboBox" | |
| 
     Product: Xtreme SuitePro (ActiveX) v15.3.1  Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) | |
|  | |
| Post Reply   | |
| Tweet | 
| Forum Jump | Forum Permissions  You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |