Re: Parsing OpenArgs statements



On Mar 30, 3:13 pm, "Rick Brandt" <rickbran...@xxxxxxxxxxx> wrote:
ManningFan wrote:
I'm trying to figure out how to do this, my form may have anywhere
from 1 to 5 arguments passed. My OpenArgs statement looks something
like this:

Arg1 | Arg2 | Arg3 | Arg4 | Arg5

I need to know if there's an easy way to pull everything prior to the
first "pipe" ( | ), and then everything from the first pipe to the
second pipe, then everything from the second pipe to the third pipe,
etc...

Anyone got any suggestions?

Dim MyArray() As String
MyArray = Split(Me.OpenArgs, " | ")

Will return an array where...

MyArray(0) = Arg1
MyArray(1) = Arg2
etc..

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

Rick/Roy -
Thanks. I knew it was something rediculously easy but at the moment
my mind is on tonite's "Heaven And Hell" show in NYC.

Gunny -
Thanks for the link but I'm going to go with Rick/Roy's code.

.



Relevant Pages

  • Parsing OpenArgs statements
    ... My OpenArgs statement looks something ... I need to know if there's an easy way to pull everything prior to the ... second pipe, then everything from the second pipe to the third pipe, ...
    (comp.databases.ms-access)
  • Re: Parsing OpenArgs statements
    ... Replace the comma in the InStr() statement with a pipe character. ... My OpenArgs statement looks something ... second pipe, then everything from the second pipe to the third pipe, ...
    (comp.databases.ms-access)
  • Re: Parsing OpenArgs statements
    ... ManningFan wrote: ... My OpenArgs statement looks something ... I need to know if there's an easy way to pull everything prior to the ... second pipe, then everything from the second pipe to the third pipe, ...
    (comp.databases.ms-access)