IMMEDIATE WINDOW

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
 
D

DS

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
 
D

DS

YIPPEE It works!
Thank you George. It only took two days!
Once again Thank You Very Much!
DS
 
G

Guest

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

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Table Def in Another DB 1
SQL and DLookup 9
No DLookUp 14
IN YOUR OPINION 14
Allen Browne's List Files Recursively 6
ExportXML 2
List files recursively 2
Trim path name from list of documents? 4

Top