Alternate way to access type?

I created an array of a custom type that I’ve specified in my script. I know I’m hoping against hope with this one, but is there a way to do something like this:

Type requestRecord

ReqNumber1 As String 

            ReqNumber2 As String

requestRecord(i).ReqNumber+x = “3”

where x is a variable, equal to “1” or “2”

Subject: Alternate way to access type?

The only thing that comes immediately to mind is to wrap the type in a Class and create a method in that class that makes it easy to set values in that manner.

Regards,

Don

Subject: Alternate way to access type?

Don’t think so. It’s the “ReqNuumber+x” that will fail.

Now if your requestRecord contained a two element array, something like this…

type requestRecord

reqNumber(1 to 2) as string

end type

… you would be able to use:

requestRecord(i).reqNumber(x) = “3”

Frunobulax

Subject: RE: Alternate way to access type?

Of course! I can’t believe that I overlooked the obvious. Thank you both for your responses - that worked perfectly.