CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Listbox invisible

Print topic Send  topic

Author Message
Karen
Posted: 04/20/2002, 2:39 AM

I created a listbox based on a table with multiple fields as the primary key, e.g., orderno and orderline. And then I want to display distinct selections of another field, e.g., delref. So I didn't select the primary key in the 'List' tab of the listbox and I entered the LookUp SQL as such:
select distinct delref
from delivery

However, the listbox appears invisible with 2 empty lines; the first is the default value of nothing and a delref after that. I know the value is correct becoz when I select the 2nd invisible line, the parameter is passed in the query string. But why does it appear invisible?

I also implemented another listbox for which I want to display the same field as the primary key, i.e., primary key = showing in the 'List' tab parameter. This one also has a similar effect, i.e., the values in the listbox are invisible. Can someone point out what I've done wrong? Thanx.
Nicole
Posted: 04/20/2002, 3:27 AM

Karen,
custom sql for listbox field (as well as for RadioButton) should select 2 fields:
select primary_key_field, showing_field from table name
Karen
Posted: 04/20/2002, 5:10 AM

Dear Nicole,

What if (2 different scenarios):
1) I want to display the primary key, i.e., the primary key is also the showing field?
2) The primary key has multiple fields, i.e., combined key?

Pls advise. Thanx.
CodeCharge Support
Posted: 04/22/2002, 1:46 AM

Once you wan to show primary key field you should select it in 'Primary Key' list and in 'Showing' list. In case you use custom sql it should be:
select key_field, key_field from table <where_caluse_if_need>

CC Listbox is designed to work with 2 fields only (primary key field and showing one).
Using several fields as key field is tricky task, because primary key field value corresponding to selected showing value is passed from the form after it is submitted. Then it is catch and used usually to update/insert field value. If key field consists of several fields you should modify default CC code in order to store in key field two (or more) values. Create custom show event and modify code to include more fields in sql and list() function. I suppose values are to be delimited with a any symbol. Then you should catch passed value and parse it in order to split separate values. This in the general approach.

   


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.