Results 1 to 10 of 10

Thread: Take elements from database table to array using VBA

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #10
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,297
    Location
    Here are 2 versions of Running Count Queries.
    The first is a Query with a VBA module that returns the Running Sum. Because it uses a Public Integer called runnungsum to hold the running sum it has to run with VBA that resets the Public Integer each time otherwise each time you run it without closing the database the running sum will start where the previous run left off.
    The second Query uses a DSum Function and an Alias combined with a precount query to achive the same thing.

    There are other methods, for instance using a dummy table with an Autonumber to create the runnng count, but the table would have to be deleted after each run.

    PLease note that Access Query SQL does not transfer directly to VBA created SQL due to syntax differences.
    Attached Files Attached Files

Posting Permissions

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