CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Radio Lists

Print topic Send  topic

Author Message
kenlyle
Posted: 02/22/2002, 6:05 PM

How do I control what get's written to the database when I use a radio list? I'd rather have the values, i.e. 'Male','Female', than the 1 or 2, etc.?

Is it necessary to write before update code to decode the value?

Thanks.
Andrew B
Posted: 02/22/2002, 6:35 PM

You could try using a custom list. For male, female do this here :
properties for field -> list -> Custom List Of Values

male;male;female;female

you put the options you want in the order you want them. You must make sure that you don't put a semicolon before or after the list. Also, you MUST have one for each. The format is this
<value>;<text>;<value>;<text>
where value is what gets written to the DB

The process is a little different if you are using DB lookups, but can be asily done as well. If you are storing the value as an integer, then you will need to change the field to a text type.

kenlyle
Posted: 02/25/2002, 12:05 PM

Thanks, Andrew...all the examples I'd seen used numbers, so I *assumed* that it had to be more complicated than just putting the choices twice...I *assumed* that the listbox used the numbers to sort the choices...Thanks for straightening me out!
kenlyle
Posted: 02/25/2002, 4:48 PM

And, I had to use the tip in Article 59, re: doing a trim() on every field/variable, to make the radio buttons finally work correctly.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.