stevekos07
Registered User.
- Local time
- Today, 08:20
- Joined
- Jul 26, 2015
- Messages
- 174
I find I am continually asking for help with the correct syntax in expressions. In this case it might be the construction of the arguments as well. I have a text box in a form which I want to show the details of a new message for a client based on a criteria of >Date()-2.
In this case I am trying to use a DLookup function within an IIF function. I want to display the contents of the field [Details] associated with the ClientID for that record in the query. The syntax I am trying to use is:
=IIf(DLookUp("[ClientID]","qryNewClientMessages","[ClientID]=" & [ClientID]),[qryNewClientMessages]![Details]," ")
I have also tried:
=IIf(DLookUp("[ClientID]","qryNewClientMessages","[ClientID]=" & [ClientID]),[Details]," ")
I get a correct but inadequate result if I use the expression:
=IIf(DLookUp("[ClientID]","qryNewClientMessages","[ClientID]=" & [ClientID]),"New Message"," ")
Help greatly appreciated.
In this case I am trying to use a DLookup function within an IIF function. I want to display the contents of the field [Details] associated with the ClientID for that record in the query. The syntax I am trying to use is:
=IIf(DLookUp("[ClientID]","qryNewClientMessages","[ClientID]=" & [ClientID]),[qryNewClientMessages]![Details]," ")
I have also tried:
=IIf(DLookUp("[ClientID]","qryNewClientMessages","[ClientID]=" & [ClientID]),[Details]," ")
I get a correct but inadequate result if I use the expression:
=IIf(DLookUp("[ClientID]","qryNewClientMessages","[ClientID]=" & [ClientID]),"New Message"," ")
Help greatly appreciated.