A
Andrew Stephens
I have setup a form where the value in a combo box
determines if a check box is enabled.
This code is called when the combo box is changed.
IF combobox.value = "TEMP" then
checkbox.enabled = TRUE
ELSE: ccheckbox.enabled = FALSE
I have also added the same code to the form's onCurrent
section since this should execute when we navigate to a
new record.
The problem I am seeing is that the checkbox is not being
enabled in old records. i.e. when I enter a new record
it works and when I browse to an old record that already
has TEMP in the combobox, the checkbox is not enabled.
I also know it is not an issue with timing and accessing
the mssql database since I tried putting the code in as a
timer event and have it occur every second, the old
records would still not activate.
The kicker is that if I toggle the combobox, on an old
record,to a different value then back to TEMP, it will
now function properly. I know the code that I have
written works since when I put it on the timer event I
could see that the checkbox was enabled a second after
the record was displayed.
What I need to happen is for the checkbox to be enabled
on all the records (even the old ones) where the combobox
value is TEMP. What I was thinking is that the enable
setting for that record is stored somewhere and only gets
updated at certain instances. How do I force this update
or fix my problem?
Thanks,
Andrew
andrew.stephens<at>intermec.com
determines if a check box is enabled.
This code is called when the combo box is changed.
IF combobox.value = "TEMP" then
checkbox.enabled = TRUE
ELSE: ccheckbox.enabled = FALSE
I have also added the same code to the form's onCurrent
section since this should execute when we navigate to a
new record.
The problem I am seeing is that the checkbox is not being
enabled in old records. i.e. when I enter a new record
it works and when I browse to an old record that already
has TEMP in the combobox, the checkbox is not enabled.
I also know it is not an issue with timing and accessing
the mssql database since I tried putting the code in as a
timer event and have it occur every second, the old
records would still not activate.
The kicker is that if I toggle the combobox, on an old
record,to a different value then back to TEMP, it will
now function properly. I know the code that I have
written works since when I put it on the timer event I
could see that the checkbox was enabled a second after
the record was displayed.
What I need to happen is for the checkbox to be enabled
on all the records (even the old ones) where the combobox
value is TEMP. What I was thinking is that the enable
setting for that record is stored somewhere and only gets
updated at certain instances. How do I force this update
or fix my problem?
Thanks,
Andrew
andrew.stephens<at>intermec.com