Type Mismatch

i have written this code in form load to load sql table in ctrlnsddatacombo when i run the code it give me a error type mismatch at [Item_description]
Item_Description is varchar(50) can plz any one help me.

Submitted byadminon Thu, 11/20/2008 - 15:44

As you can see in the procedure of bind_dc it includes only 6 paramenters. Public Sub bind_dc(ByVal srcSQL As String, ByVal srcBindField As String, ByRef srcDC As DataCombo, Optional srcColBound As String, Optional ShowFirstRec As Boolean) Your code includes 6 and the value is not correct. Here it is: bind_dc "SELECT * FROM Material_Item_List", "ORDER BY Material_Item_List.Item_Code ASC", "Item_Code", "Item_Description", "Item_Brand", "Units", True End Sub The 2nd parameter which is srcBindField have an incorrect value. Your value is ORDER BY Material_Item_List.Item_Code ASC The 3rd parameter which is srcDC have an incorrect value also. Your value is Item_Code. The procedure is expecting for a datacombo control and not string.

Add new comment