Help coding an aggregate dSum function 
Author Message
 Help coding an aggregate dSum function

I have a form and in the form change event want a total returned in textbox
txtSumInvAmt for the month showing in the textbox txtCommissionableMonth
that's on the same form.  Problem: my code returns the total for all months,
not the month I want.  Here's my code:

Dim curx As Currency
Dim dd As String

If IsNull(Me!txtCommissionableMonth) Then

Else
dd = Me!txtCommissionableMonth
curx = DSum("[SumOfcommissionableAmt]", "[Commissionable ItemsTEST]",
"[CommissionableMonth] = "  "'" & dd & "'")

End If

txtSumInvAmt = curx

Thank you for any help!



Wed, 02 Oct 2002 03:00:00 GMT  
 Help coding an aggregate dSum function
Please disregard.......it works.


Quote:
> I have a form and in the form change event want a total returned in
textbox
> txtSumInvAmt for the month showing in the textbox txtCommissionableMonth
> that's on the same form.  Problem: my code returns the total for all
months,
> not the month I want.  Here's my code:

> Dim curx As Currency
> Dim dd As String

> If IsNull(Me!txtCommissionableMonth) Then

> Else
> dd = Me!txtCommissionableMonth
> curx = DSum("[SumOfcommissionableAmt]", "[Commissionable ItemsTEST]",
> "[CommissionableMonth] = "  "'" & dd & "'")

> End If

> txtSumInvAmt = curx

> Thank you for any help!



Wed, 02 Oct 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. DSum Function...please help

2. new type of aggregate function (product function)

3. help: SQL aggregate functions

4. Need help with aggregate functions

5. Help using Domain Aggregate Functions in VB5/6

6. Problem using DSum() function

7. DSum function

8. Efficiency of DSum and DLookup functions

9. Using the DSum function in an Access Module

10. Anything like DSUM Function?

11. Custom aggregate function

12. Aggregate functions

 

 
Powered by phpBB® Forum Software