G
Guest
Hello,
Have a problem wth a form control im trying to populate from values on
another form, usually id have put in
Forms![Moneyform]![payment] = Me![TotalPayment]
but there are many forms with this and i thought about putting it in a
function, soi have a case statement that supplies where the data is going and
a variable that supplies the data to be inserted into it.
Basically ive got this inside the loop:
<!--
If CurrentProject.AllForms("Moneyform").IsLoaded = True Then
strTarget = Charge
-->
where
<!--
strTarget = "Forms![MoneyForm]![" & strbox & "]"
-->
and strbox is the result of a case block.
This should reference that control which is of the correct datatype.
and 'charge' is an currency datatype that holds a value from the form that
called this funciton.
when i use the debugger i can see that its evaluated strTarget correctly, as
in it says something like 'Forms![MoneyForm]![payment]' but im not sure its
evaluating it as a reference to a control or as a string which it cant
assign the currency value to.
again with thanks
Amit
Have a problem wth a form control im trying to populate from values on
another form, usually id have put in
Forms![Moneyform]![payment] = Me![TotalPayment]
but there are many forms with this and i thought about putting it in a
function, soi have a case statement that supplies where the data is going and
a variable that supplies the data to be inserted into it.
Basically ive got this inside the loop:
<!--
If CurrentProject.AllForms("Moneyform").IsLoaded = True Then
strTarget = Charge
-->
where
<!--
strTarget = "Forms![MoneyForm]![" & strbox & "]"
-->
and strbox is the result of a case block.
This should reference that control which is of the correct datatype.
and 'charge' is an currency datatype that holds a value from the form that
called this funciton.
when i use the debugger i can see that its evaluated strTarget correctly, as
in it says something like 'Forms![MoneyForm]![payment]' but im not sure its
evaluating it as a reference to a control or as a string which it cant
assign the currency value to.
again with thanks
Amit