Need Help with DSum Function giving #Error

J

Jim Evans

Access 2003
DB Format Access 2000

Trying to do a DSum in a textbox on a form. The Form is bound to a Table
named tblCableLocations. It contains a Field named TotalFunded,The Field I
am trying to Sum, and a Field named DeliveryOrderACRN, the Criteria Field I
am using. The Form contains a textbox named txtACRN.

This is the Code I am using in the textbox control I have added to the Form:

=DSum("[TotalFunded]","[tblCableLocations]","DeliveryOrderACRN =" &
[txtACRN])

Can anyone see where my error is?

TIA,

Jim Evans
 
D

Dan Artuso

Hi,
Is DeliveryOrderACRN text? if so, use quotes to delimit:

=DSum("[TotalFunded]","[tblCableLocations]","DeliveryOrderACRN ='" & [txtACRN] & "'")
 
J

Jim Evans

Thank you, Dan.

Jim Evans

Dan Artuso said:
Hi,
Is DeliveryOrderACRN text? if so, use quotes to delimit:

=DSum("[TotalFunded]","[tblCableLocations]","DeliveryOrderACRN ='" & [txtACRN] & "'")

--
HTH
Dan Artuso, Access MVP


Access 2003
DB Format Access 2000

Trying to do a DSum in a textbox on a form. The Form is bound to a Table
named tblCableLocations. It contains a Field named TotalFunded,The Field I
am trying to Sum, and a Field named DeliveryOrderACRN, the Criteria Field I
am using. The Form contains a textbox named txtACRN.

This is the Code I am using in the textbox control I have added to the Form:

=DSum("[TotalFunded]","[tblCableLocations]","DeliveryOrderACRN =" &
[txtACRN])

Can anyone see where my error is?

TIA,

Jim Evans
 
Top