Help with adding a 2nd "If" to statement

Lyndsey

New member
Local time
Today, 13:32
Joined
Sep 29, 2006
Messages
3
Hello :) I have a text box on my form which is populated with "Available" or "Not Available" depending on if there is a recording stored for the record or not. Recently, we have archived older recordings- so now I need to look in 2 places to determine if the recording is available or not.

This is my statement, which currently works:

=IIf(filethere("\\fs02\recordings\" & IIf(IsNull(Form.DateJoined),"NULL",CStr(Format(Form.DateJoined,"yyyy"))) & "\" & IIf(IsNull(Form.DateJoined),"NULL",CStr(Format(Form.DateJoined,"mm-dd-yy"))) & "\" & Form.HomePhone & ".wav"),"Available","Not Available")

The additional path I need to insert is:

\\fs02\recordings\d\

I have tried several times/ways of adding this, and each time I get the error
stating I am missing a parenthesis, and if I add on I get the error saying the expression I entered has a function with the wrong number of arguments.

Any hints or suggestions would be much appreciated. Also- does anyone know of a "checker" of sorts, which would test and give suggestions for corrections of expressions such as this?

Thanks!!
Lyndsey
 
So if it is not found in the first path you want to look for it in \\fs02\recordings\d\?
 
exactly...
 
IIf(filethere("\\fs02\recordings\" & IIf(IsNull(Form.DateJoined),"NULL",CStr(Format(For m.DateJoined,"yyyy"))) & "\" & IIf(IsNull(Form.DateJoined),"NULL",CStr(Format(For m.DateJoined,"mm-dd-yy"))) & "\" & Form.HomePhone & ".wav"),"Available",iif(Filethere("\\fso2\recordings\d\" & Form.HomePhone & ".wav"),"InArchiveFolder","NotAvailable")

Some thing like this should work
 

Users who are viewing this thread

Back
Top Bottom