if first letter is not a \

D

deb

I need help with an if statement in a query.


if the first letter of the field "photo" is not a \ then call the function
"fgetUNCPath" else do nothing
 
K

Ken Snell \(MVP\)

If .. Then... Else is not a typical query setup. Are you wanting to get the
value for a calculated field, and either wanting it to be the value from the
function, or .. .what ... if photo doesn't begin with the letter a? Please
give us more details about what your setup is and how you want to use this.
 
F

fredg

I need help with an if statement in a query.

if the first letter of the field "photo" is not a \ then call the function
"fgetUNCPath" else do nothing

An If statement in a query?
Queries do not support If.

You can use IIF.

I'll assume fgetUNCPath does not require any arguments, as you haven't
stated any.

Exp:IIf(Left([Photo],1) = "\" ,"",fgetUNCPath())
 
Top