Print Page | Close Window

Bug on ComboBox

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=21714
Printed Date: 18 May 2024 at 8:44am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Bug on ComboBox
Posted By: efi27
Subject: Bug on ComboBox
Date Posted: 18 June 2013 at 5:05am
Hi,
comboBox.Additem method seems to have a bug when you try to put value on the third parameters of this method (itemData)( ex. : combobox1.additem "Blabla",,1
It work until you live your function. As soon as you want to use, VB6 display an error message N° 3420 (Object is not valid)
It seems do not record the value. If you try to use then property itemdata, it's work (combobox.itemData=1)
 
Eric



Replies:
Posted By: efi27
Date Posted: 19 June 2013 at 2:55am
Did you see same thing ? if not, is it necessary to change a property value of this element ? may somebody can help me ? thanks in advance..
Eric


Posted By: ilya
Date Posted: 27 June 2013 at 9:00am
Please provide a sample demo project illustrating your issue


Posted By: efi27
Date Posted: 27 June 2013 at 9:34am
well, it works BUT i'm just coming to see than if you put a Field value (obj.fields!anyfield_id ), you have the error. You need to put val(obj.fields!anyfield_id) if you want to use .....I don't know why :
 
Form1.combobox1.additem Value,,.fields!id         ---> Don't work when you want to read the item data
Form1.combobox1.additem Value,,val(.fields!id)   --> Work !!
 
Any idea ?
 
Eric
 
Sorry for my very bad English.....


Posted By: ilya
Date Posted: 01 July 2013 at 8:52am
Please provide a sample VB demo project illustrating your issue, thanks


Posted By: efi27
Date Posted: 04 July 2013 at 1:44am
uploads/8106/TestCombo.zip" rel="nofollow - uploads/8106/TestCombo.zip
Here we are..... Test and check...
Thanks.
 
Eric


Posted By: ilya
Date Posted: 07 July 2013 at 1:33pm
fields!id returns object, you shouldn't store there a temporary object


Posted By: efi27
Date Posted: 08 July 2013 at 1:11am
Yes, i understand but why it work if you use the itemdata property of combox.
i think it would be good to have the same issue with the 3rd parameters of additem, no ?
 
Eric



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net