Home > Archive > FoxPro Help and Support > July 2005 > changing controlsource during runtime









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author changing controlsource during runtime
scrisci

2005-07-15, 12:50 pm

I am attempting to change the controlsource of a spinner box during runtime. As it decrease from 99 to 1 then to 0, the interactive change will adjust the value back to 11 and alter the controlsource from nYearsExp to another field nMonthsExp and visa versa for the upclick method

The form is using pessimistic buffering. When the settings are switched to use the other field, neither field gets updated with tableupdate() even if i go switch back to the original controlsource in the upclick.

I included my current up and downclick methods.

Thanks for any suggestions
Steve


--------------------------
The original controlsource for the spinner is ndr2yrsexp
--------------------------
[downclick. method]
IF thisform.lblmonthD2.Visible = .f. and this.value < 1
this.Value = 0
this.ControlSource = incident2.ndr2moexp
thisform.lblmonthD2.Visible = .t.
this.Value = 11
this.Refresh
ENDIF
--------------------------
[upclick. method]
IF thisform.lblmonthD2.Visible = .t. and this.value > 11
this.Value = 0
this.ControlSource = incident2.ndr2yrsexp
thisform.lblmonthD2.Visible = .f.
this.Value = 1
this.Refresh
ENDIF
--------------------------
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com