Prev: Serach option
Next: Report Printing
From: setver on 19 Apr 2010 09:47 I have an expression with which I am determining whether or not there is a value for certain fields, then using either a Null string result, one of the field values, or finally, the resulting value which gives me a website address. The problem is that my result needs to have the "www." portion removed from this last resulting string. Is there a proper expression to remove the first four characters from the string? Will it be necessary to build a second query to do this?
From: Jerry Whittle on 19 Apr 2010 09:58 You could use something like the Mid or Right functions to remove the first 4 characters, but I see a problem. Not all web sites start with www. . I suggest that you check into the Replace function as it will only mess with the www. -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "setver" wrote: > I have an expression with which I am determining whether or not there is a > value for certain fields, then using either a Null string result, one of the > field values, or finally, the resulting value which gives me a website > address. The problem is that my result needs to have the "www." portion > removed from this last resulting string. Is there a proper expression to > remove the first four characters from the string? Will it be necessary to > build a second query to do this?
From: Stefan Hoffmann on 19 Apr 2010 10:02 hi, On 19.04.2010 15:47, setver wrote: > Is there a proper expression to > remove the first four characters from the string? Will it be necessary to > build a second query to do this? Try this: IIf(InStr(Nz([field], ""), "www.") = 1, Mid([field], 5), [field]) mfG --> stefan <--
|
Pages: 1 Prev: Serach option Next: Report Printing |