#Error in getting info from subform

This is what I'm working with:
Form Orders:
- Text field "OrderTotal"
- Subform "SubOrders"
- - Field TotalAmount (= Sum(Qty * UnitPrice))

I want Orders!OrderTotal to have the same value as Orders!SubOrders.Form!TotalAmount, but when I set OrderTotal's source to
=Orders!SubOrders.Form!TotalAmount
it doesn't give a value, but only #Error

And when I do it "manually" with this code:
MsgBox Me![SubOrders].[Form]![TotaalBedrag]
I get the following error:
"Error -2147352567 (80020009) during execution: Method '_Evaluate' of object '_SubForm' failed"

Could you please help me with this? Thanks.

Comments

  • Along with describing your problem, could you please give use your actual code?

    : This is what I'm working with:
    : Form Orders:
    : - Text field "OrderTotal"
    : - Subform "SubOrders"
    : - - Field TotalAmount (= Sum(Qty * UnitPrice))
    :
    : I want Orders!OrderTotal to have the same value as Orders!SubOrders.Form!TotalAmount, but when I set OrderTotal's source to
    : =Orders!SubOrders.Form!TotalAmount
    : it doesn't give a value, but only #Error
    :
    : And when I do it "manually" with this code:
    : MsgBox Me![SubOrders].[Form]![TotaalBedrag]
    : I get the following error:
    : "Error -2147352567 (80020009) during execution: Method '_Evaluate' of object '_SubForm' failed"
    :
    : Could you please help me with this? Thanks.
    :

  • Well, I solved the problem myself. I think it wasn't really a VbCode error, but what it really was, I still don't know.
    I just created the subform again, and it worked that time, though it looked and worked exactly the same.
    Maybe it's because I copied the form from another database the first time...? I don't know.
    Thanks for your attention anyway. :)

    : Along with describing your problem, could you please give use your actual code?
    :
    : : This is what I'm working with:
    : : Form Orders:
    : : - Text field "OrderTotal"
    : : - Subform "SubOrders"
    : : - - Field TotalAmount (= Sum(Qty * UnitPrice))
    : :
    : : I want Orders!OrderTotal to have the same value as Orders!SubOrders.Form!TotalAmount, but when I set OrderTotal's source to
    : : =Orders!SubOrders.Form!TotalAmount
    : : it doesn't give a value, but only #Error
    : :
    : : And when I do it "manually" with this code:
    : : MsgBox Me![SubOrders].[Form]![TotaalBedrag]
    : : I get the following error:
    : : "Error -2147352567 (80020009) during execution: Method '_Evaluate' of object '_SubForm' failed"
    : :
    : : Could you please help me with this? Thanks.
    : :
    :
    :

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories