Adding DLookup to display field

jamiesuperman420

Registered User.
Local time
Today, 12:45
Joined
Nov 20, 2008
Messages
43
Hey - I'm trying to insert some code that'll be displayed.

I want it to say, for example:
View Properties (8)

(8 being a number added up in a Query)

Here's the code I have, it says there's a syntax error. Please help!!

[L/S Additional].Caption = "View Properties (", DLookup("[Sum Of L/S Fee]", "L/S Test", "
Code:
='" & [Code] & "'"), ")"

Thank you!!
 
Try splitting the operations up. Such as

Dim Result As Integer

Result = Nz(DLookup([Sum Of L/S Fee], "L/S Test",
Code:
='" & [code] & "'"),"")

Me.[L/S_Additional].Caption = "View Properties (" & Result & ")"[/QUOTE]

David
 
That worked great - thank you very much for your help!!
 

Users who are viewing this thread

Back
Top Bottom