A
Amy Blankenship
I apologize in advance for the cross posting, but I'm trying to widen the
set of eyes that is able to see this from
microsoft.public.access.formscoding, since I haven't gotten an answer there
yet.
I have a requirement to essentially take the things in a column returned by
a query and reorder them as rows. The rows aren't necessarily in the same
order as the columns, and some require processing. Once all the rows are
assembled, I need to write them all out to file.
To accomplish this, I created a class with properties corresponding to each
row that I need. I run the query and populate the object. I've also
created an array that contains the names of the properties I want to add to
the file, in the order I want them, but I am at a loss as to the syntax to
use to use a string instead of dot syntax to get at these properties.
What I have now is
'set up array of properties to write to file
Dim propArray As Variant, prop As String
propArray = Array("qCount", "qAttempted", "qViewed", "qAnswers",
"checkedButtons", _
"numCrossedOut", "correctCrossedOut", "incorrectCrossedOut",
"markedAs", "crossList", _
"aX", "bx", "cX", "dX", "eX", "isCorrect", "visit1Time",
"otherVisitTime")
For i = 0 To UBound(propArray)
Debug.Print propArray(i)
If i > 0 Then fileContents = fileContents & vbCr
fileContents = fileContents & propArray(i) & ": "
fileContents = fileContents & propArray(i) &
reportInfo(propArray(i))
Next
but this isn't working.
Thanks;
Amy
set of eyes that is able to see this from
microsoft.public.access.formscoding, since I haven't gotten an answer there
yet.
I have a requirement to essentially take the things in a column returned by
a query and reorder them as rows. The rows aren't necessarily in the same
order as the columns, and some require processing. Once all the rows are
assembled, I need to write them all out to file.
To accomplish this, I created a class with properties corresponding to each
row that I need. I run the query and populate the object. I've also
created an array that contains the names of the properties I want to add to
the file, in the order I want them, but I am at a loss as to the syntax to
use to use a string instead of dot syntax to get at these properties.
What I have now is
'set up array of properties to write to file
Dim propArray As Variant, prop As String
propArray = Array("qCount", "qAttempted", "qViewed", "qAnswers",
"checkedButtons", _
"numCrossedOut", "correctCrossedOut", "incorrectCrossedOut",
"markedAs", "crossList", _
"aX", "bx", "cX", "dX", "eX", "isCorrect", "visit1Time",
"otherVisitTime")
For i = 0 To UBound(propArray)
Debug.Print propArray(i)
If i > 0 Then fileContents = fileContents & vbCr
fileContents = fileContents & propArray(i) & ": "
fileContents = fileContents & propArray(i) &
reportInfo(propArray(i))
Next
but this isn't working.
Thanks;
Amy