Problems w/ Dsum field

A

AccessFitz

Hi,

I'm trying to use the Dsum field in a form. I am using the =DSum("((([Trade
Date NAV]-([Corr Date NAV]+[Dist Rate]))*[Shares]))","W0005 Table","[BIN]=" &
[BIN]). My problem is that BIN is a text field. I need to change it to a
numeric. The BIN is on the form. Do I need to insert val([BIN]) in the Dsum
expression or the BIN text box or the SQL statement? Does anyone have any
ideas?

thanks
 
O

Ofer

First, why do you need to change it to a number, just add a single quote
before and after

=DSum("((([Trade Date NAV]-([Corr Date NAV]+[Dist Rate]))*[Shares]))","W0005
Table","[BIN]='" & [BIN] & "'")

If you still want to change it to a number, try this

=DSum("((([Trade Date NAV]-([Corr Date NAV]+[Dist Rate]))*[Shares]))","W0005
Table","Cdbl([BIN])=" & Cdbl([BIN]))
 
A

AccessFitz

Ofer,

Thank You did the trick!!

Ofer said:
First, why do you need to change it to a number, just add a single quote
before and after

=DSum("((([Trade Date NAV]-([Corr Date NAV]+[Dist Rate]))*[Shares]))","W0005
Table","[BIN]='" & [BIN] & "'")

If you still want to change it to a number, try this

=DSum("((([Trade Date NAV]-([Corr Date NAV]+[Dist Rate]))*[Shares]))","W0005
Table","Cdbl([BIN])=" & Cdbl([BIN]))
--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck


AccessFitz said:
Hi,

I'm trying to use the Dsum field in a form. I am using the =DSum("((([Trade
Date NAV]-([Corr Date NAV]+[Dist Rate]))*[Shares]))","W0005 Table","[BIN]=" &
[BIN]). My problem is that BIN is a text field. I need to change it to a
numeric. The BIN is on the form. Do I need to insert val([BIN]) in the Dsum
expression or the BIN text box or the SQL statement? Does anyone have any
ideas?

thanks
 
Top