R
Rick Brandt
DS said:Can you use DLookUp in SQL?
Test2SQL = "UPDATE table1 IN '" & strPath = DLookup("BackName",
"tblBackPath", "BackID=1") & "' " & _
"SET table1.IDName = '" & Forms!Form1!TxtInfo & "' " & _
"WHERE table1.IDNumber = 1;"
DoCmd.RunSQL (Test2SQL)
Thanks
DS
If it's outside the quotes then it's not *in* your SQL string. You are just
using the value it retrieves to build your SQL string. Of course the "strPath
= " should not be there. That will cause the expression to evaluate to True
(not the value retrieved by DLookup()).