Use a column in the table itself to find the line source query condition

advertisements

In the design view of a table, in the Lookup tab, I'm entering the Row Source query. Is there some way to refer to the columns of the table itself when specifying a where condition? For example,

select [footable].[foreign] from [footable] where [footable].[id] = [self].id;

I've long been confused on this point.


Edit: to clarify with an example, let's say that the table that I'm currently editing has the name bartable, and I'm creating a row source for the dropdown for one of its columns called baz. In that dropdown I want to show the rows of select [foreign] from [footable] inner join [bartable] on [footable].[id]=[bartable].[id], but not to all results of that join using all rows of bartable - rather, using the id value from the bartable row for which the dropdown is currently being displayed. So if the user clicked the dropdown for a bartable row in the baz column, and that row had an id of 23, it would show all [footable].[foreign] where their corresponding [footable].[id] is 23.

I hope that's more clear.


If you want to compare same column it will give you all rows... there is no difference in this type of condition or where 1=1

please check what condition exectly you want to put there.. or if from other source you are getting desired id then comment or edit your question accordingly..