Hello,
I know there are several Dlookup threads already, but I have still been unable to develop a solution.
I have a DB that tracks tooling. Every time a tool is checked out to a user a record is created in table "tlogIssued", this record stores (among other things) the tool's ID, the date the tool is being checked out, and it also adds a status note indicating if the tool is "checked out" or "checked in".
I am adding a functionality to scrap tools, and I need to log every occurrence. On the new scrap log one of the things that is desired to be recorded is when the tool was last checked out.
Enter my dlookup problem- I need my dlookup to draw the 'lastissueddate' from the tlogIssued table, the only way I have come up to do this is by using multiple criteria and having the dlookup search by "toolID" (which works fine on its own) and then somehow (and this is where I am lost) by the last occurrence of the words "checked out" in the status note field (called field "InOut") for that particular toolID.
My code currently looks as follows:
Code:
DLookup("issuedOn", "tlogIssued", "[toolId]=" & Me.bxToolID.Value & " And [InOut]= " & Checked Out")
I know the above code has incorrect syntax, and I also realize that it won't find the last occurrence of the "Checked Out" status identifier.
Any and all help is appreciated.