ajw93
Posts: 7
|
| Posted: 09/27/2005, 10:20 AM |
|
I am trying to set the selected index of a Record form's list box (in insert mode) to equal the query string value instead of being set to nothing.
(the user has already selected the desired value from a previous page and that value is preserved in the querystring. i don't want the user to have to select the value again.)
the list box pulls values from a database. the bound column is an integer, the querystring value is an integer. i have tried the beforeshow events of the listbox itself, and the whole form, setting the form.listbox.value = request.querystring("ID") there but to no avail. i have also tried it in the form's Class_initialize code without any luck.
any ideas??? please! thanks!
|
 |
 |
ajw93
Posts: 7
|
| Posted: 09/27/2005, 10:38 AM |
|
FYI, I moved a hidden field into the form that had its value set by code expression to = Request.querystring("ID") but with no data source (so that it does not store in the db) and set the form.listbox.value equal to the value of that hidden field, in the list box's beforeshow event.
it works! Thanks!
|
 |
 |
DonB
|
| Posted: 09/27/2005, 12:24 PM |
|
Set the Listbox data source Where parameter. Make its type "Session" and
it's Value "theparamname". Maybe need the default parameter value set to
'0' or whatever works best for you.
--
DonB
http://www.gotodon.com/ccbth
"ajw93" <ajw93@forum.codecharge> wrote in message
news:643397f7186948@news.codecharge.com...
> I am trying to set the selected index of a Record form's list box (in
insert
> mode) to equal the query string value instead of being set to nothing.
> (the user has already selected the desired value from a previous page and
that
> value is preserved in the querystring. i don't want the user to have to
select
> the value again.)
>
> the list box pulls values from a database. the bound column is an
integer, the
> querystring value is an integer. i have tried the beforeshow events of
the
> listbox itself, and the whole form, setting the form.listbox.value =
> request.querystring("ID") there but to no avail. i have also tried it in
the
> form's Class_initialize code without any luck.
>
> any ideas??? please! thanks!
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
DonB
|
| Posted: 09/27/2005, 12:25 PM |
|
::Timeout::
Not a Session, a query parameter. Set the Type to "URL".
--
DonB
http://www.gotodon.com/ccbth
"DonB" <~ccbth~@gotodon.com> wrote in message
news:dhc68p$r28$1@news.codecharge.com...
> Set the Listbox data source Where parameter. Make its type "Session" and
> it's Value "theparamname". Maybe need the default parameter value set to
> '0' or whatever works best for you.
>
> --
> DonB
>
> http://www.gotodon.com/ccbth
>
>
> "ajw93" <ajw93@forum.codecharge> wrote in message
>news:643397f7186948@news.codecharge.com...
> > I am trying to set the selected index of a Record form's list box (in
> insert
> > mode) to equal the query string value instead of being set to nothing.
> > (the user has already selected the desired value from a previous page
and
> that
> > value is preserved in the querystring. i don't want the user to have to
> select
> > the value again.)
> >
> > the list box pulls values from a database. the bound column is an
> integer, the
> > querystring value is an integer. i have tried the beforeshow events of
> the
> > listbox itself, and the whole form, setting the form.listbox.value =
> > request.querystring("ID") there but to no avail. i have also tried it
in
> the
> > form's Class_initialize code without any luck.
> >
> > any ideas??? please! thanks!
> > ---------------------------------------
> > Sent from YesSoftware forum
> > http://forums.codecharge.com/
> >
>
>
|
|
|
 |
|