query in fields

Last Post 17 May 2004 11:19 AM by dmcdowell. 2 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
lucaseme
New Member
New Member

--
05 May 2004 08:07 AM
hi everybody,

I know that i can write a query in a field, so I put this in my field:

="select Name from table where ID=" & Fields!ID.Value

Now...my example is too sample, but, instead of something like "Tom" or "Jack", the report return me:

select Name from table where ID=1
select Name from table where ID=2
...

What's wrong?!
Thanks a lot
SQL Pro
New Member
New Member

--
05 May 2004 10:59 AM
I didn't know about queries in text boxes but the quotes are your problem there, try using parentheses instead of quotes or something like below

=select Name from table where ID = Fields!ID.Value

I'd be surprised to see this work though
dmcdowell
New Member
New Member

--
17 May 2004 11:19 AM
You must place any queries into a dataset and then reference field within that dataset in data regions.
You are not authorized to post a reply.

Acceptable Use Policy