bbarrerac
Posts: 4
|
| Posted: 06/22/2006, 7:06 PM |
|
Hello,
This is a simple question, but I haven't got it yet.
I have 2 tables:
Products, id (int), name (varchar) and brand (int).
Brands, id (int), name (varchar).
And obviously this reference of brand points to the table Brands to get the name.
Example of Product:
1, T-Shirt, 1
2, Shoes, 2
Example of Brand
1, Nike
2, Adidas
And when I do some searchs using a Grid on CodeCharge, I get those, but will return (1,T-,1) instead (1,T-Shirt,Nike) which is what I want.
I think the way to do this is using Dlookup, I figured up what I should do and I used:
Expression: name
Domain: brands
Criteria: id
Connection: Connection1
Type of Target: Control
And it seemed to work, but... is returning
1, T-Shirt,Nike
2,Shoes,Nike
instead
1, T-Shirt,Nike
2,Shoes,Adidas
Any ideas what I'm doing wrong? (Probably something wrong with my criteria?)
|
 |
 |
peterr
Posts: 5971
|
| Posted: 06/22/2006, 7:53 PM |
|
Dlookup should not be used for this. Just use both tables in your grid, so that the grid will return what you need.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
|