F
Frank B
AGT is a PUBLIC DAO recordset that is open.
Off in a subroutine I only have the name of the recordset
(e.g. Z$ = "AGT"). Clearly, I can access data in the
recordset by hardcoding:
Y = AGT("ID") ' which properly assigns the ID value to Y.
What I wish I could do is:
Y = Z$("ID") ' to accomplish the same assignment to Y.
My subroutine serves it's purposes for about 15
recordsets, and I currently must use a case statement to
resolve that the value of Z$ refers to AGT wherein the
assignment is hardcoded. A cluttered solution, that works.
Can the fields in a recordset be refernced with the name
of the recordset being a variable??? I am aware, the
fields can be referenced with a variable, but how do you
reference the recordset itself with a variable?
Thanks,
Frank
Off in a subroutine I only have the name of the recordset
(e.g. Z$ = "AGT"). Clearly, I can access data in the
recordset by hardcoding:
Y = AGT("ID") ' which properly assigns the ID value to Y.
What I wish I could do is:
Y = Z$("ID") ' to accomplish the same assignment to Y.
My subroutine serves it's purposes for about 15
recordsets, and I currently must use a case statement to
resolve that the value of Z$ refers to AGT wherein the
assignment is hardcoded. A cluttered solution, that works.
Can the fields in a recordset be refernced with the name
of the recordset being a variable??? I am aware, the
fields can be referenced with a variable, but how do you
reference the recordset itself with a variable?
Thanks,
Frank