If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Remove “www.” from a text string result in Access ExpressionBuild
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? |
#2
|
|||
|
|||
Remove “www.” from a text string result in Access ExpressionBuild
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? |
#3
|
|||
|
|||
Remove “www.” from a text string result in Access ExpressionBuild
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 -- |
Thread Tools | |
Display Modes | |
|
|