Results 1 to 7 of 7
  1. #1
    tagteam is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    501

    disable dsum field with button


    I use dsum to calculate the sum of values in another table. The problem is some users don't like it because it takes some time to calculate and they want to scroll through the records faster. These users don't even look at the value in the dsum field. Is there a way to assign code to a button that will disable that unbound element so it wont run the calculation as they scroll through the records in the form?

    I would like to have a little button right by the field and if it is too slow the user can click the button, disable the dsum and then scroll through the records quickly and then click the button again when they want to see the dsum calc.

    Thanks

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Untested, but try:

    Me.TextboxName.ControlSource = ""
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    tagteam is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    501
    I got around to trying that and it doesnt really work. I think it just sets the current value to be blank but as you scroll through it continues to try to calculate.

    I would like a way that stops the calculation so scrolling can be faster.
    Thanks

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Could do the opposite. Have a button that will give the total when requested

    Code in the form OnCurrent event to remove value if any:
    Me.TextboxName = Null

    Code in the button Click event:
    Me.TextboxName = DSum(...)

    Or forget the button and always report the total with the OnCurrent event:
    Me.TextboxName = DSum(...)
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    tagteam is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    501
    Ahh, yes i already tried that. The one that wants it enabled is the boss, the ones that don't are not. I am sure you can see the quandary. I actually asked the boss if we could switch it but he uses it a lot and said it didn't bother him.
    I suppose i can also just copy the form and make a different one for the other users but I was doing that before and it was causing a lot of update headaches.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    I edited my post as you were posting and you might not have seen the edit. Read again. See if the last option runs faster.

    Separate forms should not be necessary.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    I'll stay out of the kitchen.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Enable/Disable Button
    By P.Malius in forum Programming
    Replies: 3
    Last Post: 09-07-2012, 08:36 AM
  2. Disable command button
    By rajulasb in forum Access
    Replies: 2
    Last Post: 08-04-2011, 05:32 AM
  3. Continuous Form Disable Command Button
    By mbake085 in forum Programming
    Replies: 4
    Last Post: 05-27-2011, 08:55 AM
  4. Disable App Close button in 2007
    By ajetrumpet in forum Programming
    Replies: 3
    Last Post: 09-05-2010, 11:32 PM
  5. how to disable command button
    By archie in forum Access
    Replies: 1
    Last Post: 08-27-2009, 11:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums