CodeCharge Studio
search Register Login  

Visual PHP Web Development

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 Listbox 2 columns - Erron (0x800A0CC1)

Print topic Send  topic

Author Message
NatH

Posts: 9
Posted: 03/22/2006, 10:53 AM

In a record form, I have a listbox from another table. I want two fields to be displayed in the listbox. Noted below is the SQL used.

I simply want to save the record number of the selected row in the record form table.
===========SQL =================

SELECT HhFName + '-' + HhLName AS Expr1
FROM HH
ORDER BY HhLName

When tested, I get the following error.

======= Error Message ===========
Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
/churchroll/Classes.asp, line 2479

Noted below you will find the info from the propeties of the listbox.

============== Listbox Properties ================

Control Source Type = Database Column
Data Source Type = Table / View
Bound Column = HhId (key)
Text Column = Expr1
Data Type = Text

Any help would be greatly appreciated.

NatH

View profile  Send private message
WKempees
Posted: 03/23/2006, 3:31 AM

Listboxes always contain (ID, Value)
You have succesfully build expr1 as a concatenation of two text fields and a
dash, now you need to supply the id as well.

SELECT Id, HhFName + '-' + HhLName AS Expr1
FROM HH
ORDER BY HhLName

Find the uniquely identifying column, the one you want to store in the
target record.



"NatH" <NatH@forum.codecharge> schreef in bericht
news:644219d461ba0b@news.codecharge.com...
> In a record form, I have a listbox from another table. I want two fields
> to be
> displayed in the listbox. Noted below is the SQL used.
>
> I simply want to save the record number of the selected row in the record
> form
> table.
> ===========SQL =================
>
> SELECT HhFName + '-' + HhLName AS Expr1
> FROM HH
> ORDER BY HhLName
>
> When tested, I get the following error.
>
> ======= Error Message ===========
> Error Type:
> ADODB.Recordset (0x800A0CC1)
> Item cannot be found in the collection corresponding to the requested name
> or
> ordinal.
> /churchroll/Classes.asp, line 2479
>
> Noted below you will find the info from the propeties of the listbox.
>
> ============== Listbox Properties ================
>
> Control Source Type = Database Column
> Data Source Type = Table / View
> Bound Column = HhId (key)
> Text Column = Expr1
> Data Type = Text
>
> Any help would be greatly appreciated.
>
> NatH
>
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


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.

Web Database

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.