G
Guest
MS Access, Windows XP
==================
hi,
I'm passing the name of the current form and name of the control as OpenArgs
to another form, and storing them in an Array. When closing the new form, I'd
like to update the value of the control on the first form using the form name
and the control name stored in the array.
I've tried this a few ways, and it is not updating the value of the control
on the first form. And, it makes some sense why it is not working.
I've tried: OnClose Event of the second form:
=========
strExpr = "[Forms]![" & varOpenArgsArray(0) & "]![" & varOpenArgsArray(1) &
"]"
strExpr = Me.Text0
{does nothing}
=========
[Forms]![varOpenArgsArray(0)]![varOpenArgsArray(1)] = Me.Text0
{run-time error}
=========
When I use this:
[Forms]![frmFirst]![LastName] = me.Text0
it works.
How can I correctly construct an expression in the second form using the
Array elements which are form name and control name?
Thanks for any help or pointers.
-Amit
==================
hi,
I'm passing the name of the current form and name of the control as OpenArgs
to another form, and storing them in an Array. When closing the new form, I'd
like to update the value of the control on the first form using the form name
and the control name stored in the array.
I've tried this a few ways, and it is not updating the value of the control
on the first form. And, it makes some sense why it is not working.
I've tried: OnClose Event of the second form:
=========
strExpr = "[Forms]![" & varOpenArgsArray(0) & "]![" & varOpenArgsArray(1) &
"]"
strExpr = Me.Text0
{does nothing}
=========
[Forms]![varOpenArgsArray(0)]![varOpenArgsArray(1)] = Me.Text0
{run-time error}
=========
When I use this:
[Forms]![frmFirst]![LastName] = me.Text0
it works.
How can I correctly construct an expression in the second form using the
Array elements which are form name and control name?
Thanks for any help or pointers.
-Amit