The following routine will take a string _expression and break it into
parts as set by the delimeter:
Sub StringTestMacro()
Dim MyString, MyArray, Msg
MyString = "VBScriptXisXfun!"
MyArray = Split(MyString, "X", -1, 1)
Msg = MyArray(0)
MsgBox Msg
Msg = MyArray(1)
MsgBox Msg
Msg = MyArray(2)
MsgBox Msg
End Sub
This works and its kind of neat. It returns
VBScrip
is
fun!
But, what if instead you want to replace the line
MyString = "VBScriptXisXfun!"
with a reference to an field in an Access Table. How would you proceed
to reference this item??? (Suppose the Table name is Table1, the field
name is Address)
parts as set by the delimeter:
Sub StringTestMacro()
Dim MyString, MyArray, Msg
MyString = "VBScriptXisXfun!"
MyArray = Split(MyString, "X", -1, 1)
Msg = MyArray(0)
MsgBox Msg
Msg = MyArray(1)
MsgBox Msg
Msg = MyArray(2)
MsgBox Msg
End Sub
This works and its kind of neat. It returns
VBScrip
is
fun!
But, what if instead you want to replace the line
MyString = "VBScriptXisXfun!"
with a reference to an field in an Access Table. How would you proceed
to reference this item??? (Suppose the Table name is Table1, the field
name is Address)