J
Jonas
I'm hoping that somebody can help me out with a DSum formula
associated with a command button on a form. Here is what I have:
sumshares = DSum("[shares]", "tblUnfilledsubtable", [TradeIDauto] =
TradeID)
The current result is the sum of all of the shares in the field
"shares"
TradeIDauto is a field in "tblUnfilledsubtable"
TradeID is a string variable that contains the Trade ID from the
current form. I know that my code obtained the trade ID because I
can get it to show in a message box.
I know that the problem is the criteria section because if I enter an
ID that exists in tblUnfilledsubtable it works. Here is an example:
sumshares = DSum("[shares]", "tblUnfilledsubtable", "[TradeIDauto] =
17")
Any suggestions for dealing with variables in a DSum formula are much
appreciated.
associated with a command button on a form. Here is what I have:
sumshares = DSum("[shares]", "tblUnfilledsubtable", [TradeIDauto] =
TradeID)
The current result is the sum of all of the shares in the field
"shares"
TradeIDauto is a field in "tblUnfilledsubtable"
TradeID is a string variable that contains the Trade ID from the
current form. I know that my code obtained the trade ID because I
can get it to show in a message box.
I know that the problem is the criteria section because if I enter an
ID that exists in tblUnfilledsubtable it works. Here is an example:
sumshares = DSum("[shares]", "tblUnfilledsubtable", "[TradeIDauto] =
17")
Any suggestions for dealing with variables in a DSum formula are much
appreciated.