I'm using the DLookup function as the control source for a text box on a subform and it is returning "#Error".
But, if I open the subform on it's own - it returns the correct data.
Here's the code:
I don't think it's a problem with the code itself, because it works when I use it on the main form.
Any ideas on what could cause it to not work when placed in the subform?
But, if I open the subform on it's own - it returns the correct data.
Here's the code:
=DLookUp("[STATUS]","[tblSTATUS]","[tblSTATUS].[ID] = (SELECT [tblACTIONS_StatTRACKING].[1PREV] FROM [tblACTIONS_StatTRACKING] WHERE [tblACTIONS_StatTRACKING].[ID] = [Forms].[sbfrmSTATUS].[ID])")
I don't think it's a problem with the code itself, because it works when I use it on the main form.
Any ideas on what could cause it to not work when placed in the subform?