Ok..here is what I am attempting to do.
Update query based on a form text box control (txtID) and run from a command button.
The user will input an equipment number. Since the query is actually a hierarchy tree the user may not necessarily know which column it is located.
Based on the equipment number, the query will return all rows that include the equipment number.
I think I can do it with a recordset or dlookup...
If DLookup("IDValue", "tblbase", "IDValue = '" txtid "'") = 0 Then
SELECT tblBase.IDValue, tblBase.Level1, tblBase.Level2, tblBase.Level3, tblBase.Level4, tblBase.Level5, tblBase.Level6, tblBase.Level7, tblBase.Level8, tblBase.Level9, tblBase.Level10, tblBase.Level11, tblBase.Level12
FROM tblBase
WHERE (((tblBase.IDValue) Like "*"));
ELSE
IF DLookup(...) > 0 Then
Select
From
Where (((tblbase.IDValue) Like "[Forms]![frmForm]![txtid]"
I also need to return the row even if there is null values in other fields (use nz?)
I need help with the best method to perform this and syntax.
Any help is appreciated. Thanks in advance.