Karen Hill wrote:
How do I include a where clause that contains a form value in a Row
Source SQL query? This is in the form properities under DATA.
SELECT [Categories].[CategoryName] FROM Categories WHERE Catogories.id
= Me![id];
The "Me![id]" is a form control.
Usually you do something like this
Dim strSQL As STring
dim rst As Recordset
strSQL = "SELECT [Categories].[CategoryName] " & _
"FROM Categories " & _
"WHERE Catogories.id = " & Me![id];
set rst = currentdb.openrecordset(strSQL,dbopendynaset)
If you are in the query builder, you need to know the name of the form
SELECT [Categories].[CategoryName] _
FROM Categories _
WHERE Catogories.id = Forms!YourFormName!ID