I created a combobox in a form (style=dropdown combo). user can input
his own text or select from an existing one.

I entered some text into it. After a thisform.refresh(), the
combox.value was cleared. Why? how could I keep the user-inputted value
persistent?

As a result, I couldn't save the value to the combobox.controlsource.

The underlying table is having buffering=5.

Re: combobox by Stefan

Stefan
Sat Jun 25 03:01:02 CDT 2005


"man-wai chang" <toylet.toylet@gmail.com> schrieb im Newsbeitrag
news:ODt9UmTeFHA.1684@TK2MSFTNGP09.phx.gbl...
>I created a combobox in a form (style=dropdown combo). user can input his own text
>or select from an existing one.
>
> I entered some text into it. After a thisform.refresh(), the combox.value was
> cleared. Why? how could I keep the user-inputted value persistent?
>
> As a result, I couldn't save the value to the combobox.controlsource.
>
> The underlying table is having buffering=5.

Right, you'll need to add the new value to combo.RowSource. Since there is
no built-in automatism, you can do so manually - e.g. in pseudo code:
* combo.Valid
IF !(This.Value == This.DisplayValue)
DO CASE
CASE INLIST(This.RowSourceType, 0,1)
This.AddItem(m.tcNewItem)
CASE This.RowSourceType = 2
INSERT INTO ( GETWORDNUM(This.RowSource,1,'.') ) ;
( GETWORDNUM(This.RowSource,2,'.') ) ;
VALUES (This.DisplayValue)
Case ...


hth
-Stefan



--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------


Re: combobox by man-wai

man-wai
Sat Jun 25 07:08:55 CDT 2005

> Right, you'll need to add the new value to combo.RowSource. Since there is
> no built-in automatism, you can do so manually - e.g. in pseudo code:

I got it.... I thought it would work like a normal textbox when the
style is a "dropdown combo".

--
.~. Might, Courage, Vision. http://www.linux-sxs.org
/ v \
/( _ )\ Linux 2.4.30
^ ^ 8:07pm up 43 days 8:16 load average: 1.13 1.18 0.67