CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 Invalid Column Name

Print topic Send  topic

Author Message
defiantclass1

Posts: 24
Posted: 12/23/2005, 7:21 AM

I have a lookup list field in my Record Form that is supposed to look to another table for the value. I am getting an error:

Invalid Column Name 'OrderHSalesReps' (Microsoft OLE DB Provider for SQL Server)

The table the form is built is called "OrderHeader" and the field that gets the value is called "OrderHSalesRep" and it is a numeric field and should contain the ID number of the selected record from the lookup.

The table this field looks up to is called "SalesRep". It has a "UniqueRepNo" field which is the primary key and a "SalesRepTitle" field which is text.

The field on the form displays the value from the SalesRepTitle field when the drop down is selected, no problem. But when I "Add" the record I get the error.

My settings are:
Control Source Type: Database Column
Control Source: OrderHSalesRep (the field in the record form)
Data Source Type: Table/View
Data Source: SalesRep (The lookup to table)
Bound Column: UniqueRepNo (the ID field of the lookup table)
Text Column: SalesRepTitle (the text to display in the lookup)

Can anyone suggest what is causing this error??

Thanks
View profile  Send private message
Benjamin Krajmalnik
Posted: 12/23/2005, 5:18 PM

A control source is bound to the database.
I assume this is a list control
The Control Source needs to be the field in the primary record of the form.
Make sure it is bound in your selection query by trying to reselct it from
the list of available fields.

In some cases, I have change the query (which resulted in a change to the
actual field alias) - so you may need to check this as well.

defiantclass1

Posts: 24
Posted: 12/23/2005, 6:12 PM

Thank you for responding. I should have posted that I found the problem. As I am still new to Code Charge I am making mistakes along the way.

What happened was I built a query when I should not have, or at least didn't need to. In the record form I had the lookup table included in the query. All I needed was to reference that table in the properties settings. The settings I had were correct and they worked as soon as I removed the lookup table from the query.

Don't know if that is correct, as you know things to be, but it worked for me.

Thanks very much for your time!!
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.