View Full Version : How can i change a String in a field?


Raser
08-04-2001, 12:08 PM
Hello

I'm currently working on a logging system for internet use. De data fot the field is imported from a log file of IIS5.

The problem is, that the url's look like below.

(3)www(9)microsoft(3)com(0)

How can i change parts of this field so it looks like www.microsoft.com (http://www.microsoft.com)

Greetz Erik

The_Doc_Man
08-06-2001, 10:03 AM
Looks like some VBA code might be in your future.

I would recommend using a combination of InStr and the Left function to pull apart the stuff broken by parenthetical expressions. Look for the left-most "(", then use Left to pull out that part. Then look for the left-most ")" to find the start of the rest of the field. Extract that and keep on chopping. As you pull one more chunk out of the source field, concatenate it (& operator) with a dot and the next part of the field. When you reach the last part, concatenate without the extra (trailing) dot that you surely don't want to see.

DALeffler
08-06-2001, 12:21 PM
If you want to see da code 'Der Good Doctor be talking 'bout, post back; I couldn't tell if you were interested in code to parse the text field or get a text field to display a hyperlink...

Doug.