Recent content by johnywhy

  1. J

    How to build a Dictionary recursively?

    Yes, if this procedure lived in a class or module by itself, then the Dictionary could be a module-level variable. However, it shares a module with various unrelated procedures. My last version, above, is my favorite so far.
  2. J

    How to build a Dictionary recursively?

    Thx, this is helpful. It's similar to what i'm already doing. i'll go with my last version, above.
  3. J

    How to build a Dictionary recursively?

    Here's another version. In this case, my FileSystemObject and Dictionary aren't set to Nothing until the very end, and no objects are left open. Problem is: it's two functions. Would be nicer if could do it in one function. Function Get_Files3(ByVal sDir As String) As Dictionary...
  4. J

    How to build a Dictionary recursively?

    For this question, i'm asking about the Dictionary object. Of course it could be done with an Array or Collection, but I don't want to use an Array just because i don't know how to do it with a Dictionary. i want to learn how to do it with a Dictionary. As mentioned in the OP, the code returns...
  5. J

    How to build a Dictionary recursively?

    This one is a little better, because it's called the same way every time, and it's not necessary to set the local dictionary to nothing, since it's passed as a parameter. But, i don't get to Set oFSO = Nothing Function Get_Files2(ByVal sDir As String, dFiles As Dictionary, Optional oFSO As...
  6. J

    How to build a Dictionary recursively?

    It loads a dictionary with all the files in a directory and all subdirectories.
  7. J

    How to build a Dictionary recursively?

    This code actually returns a correct result, but i can tell that it's flawed. It loads a dictionary with all the files in a directory and all subdirectories. I don't get a chance to `Set dFiles = Nothing`. Is there a way to check if it's the last loop? The initial caller uses `Set dF =...
  8. J

    > Grid-rows Not Displaying Selected-state Correctly After Many VBA Requeries

    i think i solved this. Problem: when vba selects all rows in a listbox every time the listbox is requeried, selection behavior gets wonky: selected rows do not appear selected. the fix is to UNselect all rows in the target Units table before requerying it. Produced wonky selection behavior...
  9. J

    > Grid-rows Not Displaying Selected-state Correctly After Many VBA Requeries

    hi i think what you're doing is: -- moved some of the code into the form, instead of in a module. -- you're no longer selecting all items in the Units list on each click of the Warehouse click -- you took the query source out of the Units list, and instead you're updating the Units list with...
  10. J

    > Grid-rows Not Displaying Selected-state Correctly After Many VBA Requeries

    here's a stripped-down access db, containing only the objects and code necessary to duplicate the issue. https://drive.google.com/folderview?id=0B8FhwalyGcnvNWVMTWdvd1FaMEk let me know if you cannot open this. i think it might be a problem with my display driver.
  11. J

    > Grid-rows Not Displaying Selected-state Correctly After Many VBA Requeries

    ListBox-rows Not Displaying Selected-state Correctly After Many VBA Requeries Access 2010 Desktop this is very weird (and urgent). when i select rows in a ListBox control on a form, using access VBA, some rows behave exactly the opposite of how they're supposed to behave-- they APPEAR...
  12. J

    Cannot Get ListBox .ItemsSelected, help!

    Help. i am unable to retrieve .ItemsSelected of a multiselect listbox on a form. 1. the form is visible 2. i manually select some items in the listbox. 3. then in VBA i get the .ItemsSelected.Count property of the listbox. 4. ItemsSelected.Count returns 0. This is a bug? 5. i can clearly see...
  13. J

    Totals Query/sums/grand totals

    Fyi, you can show Grand Totals in a query, without using a report. -Open the query in datasheet view. -Click the Home ribbon -Click the Totals button -At the bottom of the datasheet window, you see the Totals cells. -Click the dropdown on any Totals cell, and pick the kind of grand total you...
  14. J

    Totals Query (Grand Total)

    Not quite true, you can show Grand Totals in a query. -Open the query in datasheet view. -Click the Home ribbon -Click the Totals button -At the bottom of the datasheet window, you see the Totals cells. -Click the dropdown on any Totals cell, and pick the kind of grand total you desire...
  15. J

    How To Delete Column-Data Without Query or Macro?

    hello the question is about using FORM-based datasheets for user-entry. No one has suggested using backend datasheet table-view for front end user entry.
Top Bottom