When I create a new command of a report that looks like that
select e.x, a.x, a.y
from T开发者_StackOverflowable1 t,
table2 a
where a.z = e.z
and a.xx = form1.ComboBox1.Text
it generates an error. Is there a way to do it?
Thanks
Your columns need to have different names to each other - at present, the first two columns are both called x. Also, if your ComboBox has multiple values, you need to use an IN condition, not an =. Try changing the query to look like:
select e.x e_x, a.x a_x, a.y
from Table1 e,
table2 a
where a.z = e.z
and a.xx IN (form1.ComboBox1.Text)
精彩评论