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
|
|||
|
|||
Isolating text in a field
Hi folks! The following text is an example: "F002 Internal Audit Summary Report Form Rev B.doc" How do I isolate "Rev B" considering that everything that comes before isn't necessarily the same length in each record. Cheers! |
#2
|
|||
|
|||
Isolating text in a field
You can use the VBA function InStr( ), see the help file, to spot the
beginning of "Rev B" and then, use Left( ), or Mid( ), to segment the strings in its parts: Left( MyField & "Rev B", InStr( MyField & "Rev B" , "Rev B") - 1 ) will give what precedes the first occurrence of Rev B, in your string, or the whole string, if Rev B is absent. Hoping it may help, Vanderghast, Access MVP "scubadiver" wrote in message ... Hi folks! The following text is an example: "F002 Internal Audit Summary Report Form Rev B.doc" How do I isolate "Rev B" considering that everything that comes before isn't necessarily the same length in each record. Cheers! |
Thread Tools | |
Display Modes | |
|
|