DSum Problem

  • Thread starter Thread starter Anthony Viscomi
  • Start date Start date
A

Anthony Viscomi

I am try to use the DSum function in the following manner:

Dim intBaseTotal as Integer
Dim intFilter as Long

intFilter = Me.ID
intBaseTotal= DSum("[Base_Price]", "tbl_OrderB", "[ID_B]"= intFilter)
Me.txtBasePriceTotal= intBaseTotal

I keep getting a "Type Mismatch"; if I replace the variable (intFilter) with
an actual value (4) it works fine. Any thoughts?

Thanks!
Anthony Viscomi
 
Try it this way:
intBaseTotal= DSum("[Base_Price]", "tbl_OrderB", "[ID_B]="
& [intFilter])

-----Original Message-----
I am try to use the DSum function in the following manner:

Dim intBaseTotal as Integer
Dim intFilter as Long

intFilter = Me.ID
intBaseTotal= DSum
("[Base_Price]", "tbl_OrderB", "[ID_B]"= intFilter)
 
Works great...thanks!
Ernie said:
Try it this way:
intBaseTotal= DSum("[Base_Price]", "tbl_OrderB", "[ID_B]="
& [intFilter])

-----Original Message-----
I am try to use the DSum function in the following manner:

Dim intBaseTotal as Integer
Dim intFilter as Long

intFilter = Me.ID
intBaseTotal= DSum
("[Base_Price]", "tbl_OrderB", "[ID_B]"= intFilter)
Me.txtBasePriceTotal= intBaseTotal

I keep getting a "Type Mismatch"; if I replace the variable (intFilter) with
an actual value (4) it works fine. Any thoughts?

Thanks!
Anthony Viscomi


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top