I'm just finishing my third beer, so maybe this answer is not so coherent...
Say, you've opted for the following construction:
Code:
cmdNew.Click
THISFORM.Reset()
METHOD Reset (on the form)
cboChoice.VALUE = <default value>
(..)
A more structured approach:
create an object cCombo based on the combobox
Add a method Reset()
Code:
Code:
LPARAMETERS tuValue
THIS.VALUE = tuValue
Now, following the same example as above:
Code:
cmdNew.Click
THISFORM.Reset()
METHOD Reset (on the form)
cboChoice.Reset( <default value> )
(..)
Ok, that's the general idea. If you're combo box has a control source set, the following also works; given the same example and given that the control source is set to THISFORM.cboValue:
Code:
cmdNew.Click
THISFORM.Reset()
METHOD Reset (on the form)
THIS.cboValue = <default value>
cboChoice.REFRESH()
(..)
The answer you probably need:
If using a controlsource; reset the controlsource value AND refresh the combobox
('cause of them beers, I did check; works fine)
Diederik Vermeeren
verm1864@exact.nl