Method stops firing

I have a combobox based on a valuelist. the onDataChange event calls setStateID (sets the global variable stateIdSelected with the value of the combo.

function setStateID()
{
globals.stateIdSelected = forms.frm_JursList.stateid;
}

On the third change of the combo box the method appears to stop firing. I have a field on my form that shows the value of stateIdSelected. On the third change it stops updating.

ALSO - I noticed from time to time after changing the value of the combo box it’s blue - nothing displayed… why is this

What is the dataprovider of your combobox? Why don’t you just use the global as the dataprovider? Then it automatically gets the value of the combobox.

I’m not sure why your field is empty sometimes, but maybe you can give some more info. What kind of valuelist do you use? Is it based on a table or is it a custom one?

the data provider for the combobox is a valuelist is based on a table. The function sets the global variable and is fired onDataChange. All I want to do is make a selection from the combobox and set that id value to the global variable. If I keep making changes to the combo selection it stops firing. I know this because I have a field on the form to display the global var.

kschuster:
the data provider for the combobox is a valuelist is based on a table.

A dataprovider and a valuelist are different things.

In the same list of properties where you see “onDataChange” and “valuelist”, there is also a propertie “dataProvider”, that’s the one I’m talking about.

that got it!
I set the data provider to the global var and it works perfectly
thanks!!