JHoffman
|
| Posted: 11/18/2005, 7:59 PM |
|
I am trying to replace a variable in a non-editable grid with a lookup from another table. I have the variable {category} in the grid form "Catalog" and i'm trying to look up the "CatName" in the "Category" table where variable {category} equals "catID".
Here's my before show code for {category} in the grid:
Catalog.Category.Value = Cstr(CCDLookup("CatName", "Category", "CatID =" & Category.Value , DBsqlserver))
I keep getting this error:
Variable is undefined: 'Category'
If i try this code, I get the lookup value i expect:
Catalog.Category.Value = Cstr(CCDLookup("CatName", "Category", "CatID =1", DBsqlserver))
I'm sure i'm overlooking something obvious, but every combination I've tried kicks back one error or another. This used to be so easy in CC!
Thanks.
|
|
|
 |
Edd
Posts: 547
|
| Posted: 11/18/2005, 10:16 PM |
|
Try
Catalog.Category.Value = Cstr(CCDLookup("CatName", "Category", "CatID =" & Catalog.Category.Value , DBsqlserver))
Edd
_________________
Accepting and instigating change are life's challenges.
http://www.syntech.com.au |
 |
 |
DonB
|
| Posted: 11/19/2005, 8:39 AM |
|
Actually the lookup should not be needed, if you construct the query for the
grid such that it contains the Category table. And it will be considerably
more efficient, too.
--
DonB
http://www.gotodon.com/ccbth
"JHoffman" <JHoffman@forum.codecharge> wrote in message
news:6437ea32d207fa@news.codecharge.com...
> I am trying to replace a variable in a non-editable grid with a lookup
from
> another table. I have the variable {category} in the grid form "Catalog"
and
> i'm trying to look up the "CatName" in the "Category" table where variable
> {category} equals "catID".
>
> Here's my before show code for {category} in the grid:
>
> Catalog.Category.Value = Cstr(CCDLookup("CatName", "Category", "CatID =" &
> Category.Value , DBsqlserver))
>
>
> I keep getting this error:
> Variable is undefined: 'Category'
>
> If i try this code, I get the lookup value i expect:
> Catalog.Category.Value = Cstr(CCDLookup("CatName", "Category", "CatID =1",
> DBsqlserver))
>
>
> I'm sure i'm overlooking something obvious, but every combination I've
tried
> kicks back one error or another. This used to be so easy in CC!
>
> Thanks.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
|