Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

looping through a recordset 2

Status
Not open for further replies.

Thorny

Programmer
Jul 2, 2001
23
GB
I am looping through a recordset, I am comparing the values in one of the fields of this recordset with parts of a string from a bookmark in a Word 97 document. Once there is a match eg. "Mr" in the recordset is matched with the "Mr" part of someones name in the bookmarked field, the name part of the string must be disreguarded and only the remainder of the field must be kept which in my case is the address, this will then be deposited into another field which is the address only field. Any ideas and I am using Office 97 so there is no Join or Split functions.
 
Somewhere in these pages there are a number of 'versions' of Split for Ms. Access '97. My own contribution is 'basSplit' refer thread181-32062, titled {Format Strings" for this version. I haven't generated or seen a 'home brew' version of Join, but it really shouldn't be much different than the split thing. If that is your only hang up, I would generate one for you.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
I would appreciate it if you could generate a 'home brew' version on Join for me. Thanks alot for the split code it really helped
 
Code:
Public Function basTestJoin()

    Dim MyWords As Variant
    Dim ThisHereLine As String
    Dim MyNewLine As String
    Dim ThisLine As String
    
    ThisLine = "The,quick,browm,fox,jumped,over,the,lazy,red,dog"
    MyWords = basSplit(ThisLine, ",")

    For Idx = 0 To UBound(MyWords)
        Debug.Print MyWords(Idx)
    Next Idx

    MyNewLine = basJoin(MyWords, ";")
    Debug.Print MyNewLine

End Function
MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top