IMMEDIATE WINDOW

  • Thread starter Thread starter George Nicholson
  • Start date Start date
G

George Nicholson

I'm putting in ?REDACT() and getting nothing back.
Understandable.

Additions are enclosed with *, but all * should be removed before trying to
run the code.

Public Function REDACT() *As String*
Dim strPath As String
strPath = Nz(DLookup("BackName", "tblBackPath", "BackID=1 AND
BackActive=-1"), "")
*REDACT = strPath*
End Function


HTH
 
How do I check this Function in the Immediate Window?

Option Compare Database
Option Explicit
Public Function REDACT()
Dim strPath As String
strPath = Nz(DLookup("BackName", "tblBackPath", "BackID=1 AND
BackActive=-1"), "")
End Function


I'm putting in ?REDACT() and getting nothing back.

Thanks
DS
 
Actually, you don't really need the strPath variable:

Public Function REDACT()
REDACT = Nz(DLookup("BackName", "tblBackPath", "BackID=1 AND
BackActive=-1"), "")
End Function
 
Back
Top