CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Listbox on Form not Display Record Value

Print topic Send  topic

Author Message
Dreamcatchers


Posts: 120
Posted: 11/20/2010, 11:59 AM

I have a form which has a listbox. I select the appropriate option and hit submit and it write all the form data to the database.

When I use the same form to display the record, all data shows except the listbox. Other programs dont' have this problem and I have not seen post on the issue in the forum.

Must be operator error but I haven't a clue.

It is a text field. Any dieas?
_________________
Training and LMS Developer
View profile  Send private message
andrewi

Posts: 162
Posted: 11/21/2010, 7:14 AM

How are you specifying the listitems in the list box?

Are you using the Data Source, Bound Column, Text Column values on the Listbox property sheet? Or did you right-click the listbox, choose "<SELECT> properties..." and enter fixed items from there? The second method won't display vaules from the database - though it will probably save values to the database.
View profile  Send private message
Dreamcatchers


Posts: 120
Posted: 11/23/2010, 11:05 AM

I originally used the "List of Values" method. It did save values to the database but did not diplay the value when I was displaying a record.

So I built a table to list the values and now call the table is has ID as record id and Course_name as the named value.

My record I am writing to uses a text field for the course name. So on the form field with the list box I have:
Connection: mydb
Data Source Type: Table/View
Data Source: Coruse list (table from the DB)
Bound Column: Course_name
Text Column: Coruse_name
Data type: Text
_________________
Training and LMS Developer
View profile  Send private message
andrewi

Posts: 162
Posted: 11/23/2010, 1:06 PM

Actually ListOfValues will work too - all four options under "Data Source Type" will both display and save values to database. The only method that won't display (i.e. select) the database value, as far as I know, is by right-clicking the actual control on the design area, choosing the option I mentioned before, and entering your list values there.

All the properties you list are fine. No problem it being a text field, nor choosing the same field for the Bound and Text columns. I assume there's no event code attached to the list box or form that could be interfering. No errors mentioned in the Messages box when you build the page.

You could try investigating back a step: delete the listbox, put a textbox in its place and set its control source to the same field. Just to confirm that the value you expect is being retrieved when the record is displayed.


View profile  Send private message

Add new topic Subscribe to topic   


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

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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