Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Portland, Maine, USA
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problem with Control Source calc on some pcs (2002/SP2)

    I hope someone here can help...

    I created a database on my system at home, here are the specs. Windows XP Pro with Office XP Developer both at the latest SPs. I finally got everything working just right so I went to install it on the clients system (Windows 2000 with Office XP Pro). First I got missing references so I changed the 3 missing ones to point to the ADO ActiveX dll versions 2.5 instead of the 2.7 that I have at home, compiled and all is fine....except!!!
    The control source on one of my text boxes is the calculation below:

    =IIf(IsNull(DSum("[Payment Amount]","qryPaymentsListboxSource")),0,DSum("[Payment Amount]","qryPaymentsListboxSource"))

    It doesn't want to calculate!! If [Payment Amount] is null ( they have made no payments) then all is fine, it puts a 0 there. The problem is when they have made payments it's not calculating them. The status bar just shows "Calculating........" forever, although it works fine on my machine at home.

    So here I am still at work on a system that is pretty much identical to that of my clients pc and it works fine. Does anyone have any idea what settings on my clients pc would be causing that calculation to break??

    Things that I checked and tryed:
    Updated his pc to latest updates for Windows and Office.
    Made sure Jet was at the latest version.
    Updated his MDAC to version 2.7 SP2

    I would really appreciate ANY ideas...

    Thanks,
    Don

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Problem with Control Source calc on some pcs (2002/SP2)

    I'm afraid I have no idea what causes this problem. The following is not much different from what you have, but who knows...

    1. Try the Nz function instead of IIf and IsNull:
    =Nz(DSum("[Payment Amount]","qryPaymentsListboxSource"),0)

    2. Put Nz inside the DSum:
    =DSum("Nz([Payment Amount],0)","qryPaymentsListboxSource")

  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Portland, Maine, USA
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Problem with Control Source calc on some pcs (2002/SP2)

    I will try what you suggested and will let you know how it turns out tomorrow.

    Thank you!
    Don

  4. #4
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Portland, Maine, USA
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Problem with Control Source calc on some pcs (2002/SP2)

    Hans....your first expression worked great!! Now I'm going to look into why dsum worked on mine but not on his.

    Thanks again!
    Don

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •