Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / July 2007

Tip: Looking for answers? Try searching our database.

DSum Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Beetle - 22 Jul 2007 00:18 GMT
I have a continuous form with an unbound text box that has a DSum function as
it's control source. It is used to display the sum of a field in a query. It
works fine except that the last line of my form (the one for a new record)
displays #Error in this text box. My DSum function is;

= DSum("SumOfFootprint", "qryBoxTotals", "BinID = " & [BinID])

I've tried assigning it to the text box control source through code;

Me.txtFootPrintSum.ControlSource = DSum("SumOfFootprint", "Query1", "BinID =
" & Me![BinID])

but then I get the #Name error in the text box. I've also tried adding nz to
my DSum but that doesn't make any difference (although I'm sure if I was
placing correctly in the DSum or not)

Maybe I need a statement like;

If Not Me.NewRecord Then... but I'm not sure.

Any suggestions would be appreciated. Thanks
Steve - 22 Jul 2007 00:29 GMT
Base your form on a query and use your DSum expression and create a
calculated field in the query. Assign this field to the control source of
your existing unbound text box. You won't have your problem any more!

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resource@pcdatasheet.com

>I have a continuous form with an unbound text box that has a DSum function
>as
[quoted text clipped - 21 lines]
>
> Any suggestions would be appreciated. Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.