Nevermind, as I said I had looked at it too long. I was changing the value of the controlsource later and that was changing the display value of course! Sheesh! You'd think it was Friday... :o)
Tracy
>I have a form array that is populated with afont. The array is used to populate a combobox. I want to position the combobox at "courier new" if courier new is found in the array. Following that, I display the font in a textbox. What is strange is that after running the code below, the textbox displays courier new font, but the listbox displays the first item in the list! Any ideas? I've looked at this too many times and I'm missing the obvious I'm sure....
>TIA,
>Tracy
>
>code to locate font in array:
>form.init()
>
>gnPos = ASCAN(thisform.gaFontArray, 'Courier New')
>*Note the result here is the correct value-it locates it fine
>IF gnPos != 0
> thisform.combo1.requery()
> thisform.combo1.listindex=gnPos
> thisform.text1.click()
>ENDIF
>
>
>Here is the strange part. As I said, the combo box actually displays the first item in the list, but the code below displays the text in the correct font of courier new!
>
>Textbox code that works as it should:
>thisform.text1.click()
>
>THIS.value="This is an example of the font "+ALLTRIM(thisform.combo1.value)+". Size "+ALLTRIM(thisform.combo2.value)
>This.fontname=ALLTRIM(thisform.combo1.value)
>This.fontsize=VAL(ALLTRIM(thisform.combo2.value))
>thisform.refresh()
>DODEFAULT()
>
>
>What am I missing?
.·*´¨)
.·`TCH
(..·*
010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"