Search results

  1. T

    Silent error adding to VBA.Collection

    I was F8 stepping through the code line by line and watching the collection in the Locals window. It was an iterating section of code (populating a custom object from a recordset and adding it to the collection). For the first five adds you could see the new item in the tree of the collection...
  2. T

    Silent error adding to VBA.Collection

    I expect he's just wrong, but here they are
  3. T

    Silent error adding to VBA.Collection

    http://www.experts-exchange.com/articles/3391/Using-the-Dictionary-Class-in-VBA.html This is my 10th post so wasn't able to post it in the last message!
  4. T

    Silent error adding to VBA.Collection

    Thanks. I had been looking at the experts-exchange article Using-the-Dictionary-Class-in-VBA, which said you could only return items by key, not index and that when using .Items "There is no guarantee that the order of items in the array will match the order in which you added those items to the...
  5. T

    Silent error adding to VBA.Collection

    Thanks, useful suggestion if it goes wrong again. My understanding - could be wrong - was that a dictionary was like a bag, you couldn't know you'd get it back in the order you put it in (unless you put that order in the key).
  6. T

    Silent error adding to VBA.Collection

    Thanks, I'd forgotten about SetWarnings, but again I haven't got anything like that in my code, and just a few lines later in the same class it was bugging out. But I agree, it's really odd and that was what had me so confused! At the time it was reproducible, but now with no change, just...
  7. T

    Silent error adding to VBA.Collection

    Thanks for the suggestion but I don't think so (do you mean by providing an On Error... or is this an option in the IDE?) I was getting errors elsewhere as a result of the items not being added. I'd been stepping through the code and hadn't provided error handlers. By error I just mean the item...
  8. T

    Silent error adding to VBA.Collection

    Okay, thanks. Well now I'm completely perplexed as I can't recreate the behaviour. All three versions are working as I would expect. I wasn't expecting a good old fashioned turn it off and turn it on to do the trick!:o
  9. T

    Silent error adding to VBA.Collection

    I was working with collections for the first time yesterday and came across a couple of oddities. I was adding 7 objects, each with a unique string key. The first five objects were added fine, the last two were silently ignored. These had keys with square brackets like "[key6]" and "[key7]". Not...
  10. T

    Refresh - requery - resummat

    Sorry, hadn't read the first part properly. So you need to clear the combobox first. me.comboBoxName = Null should do it
  11. T

    Refresh - requery - resummat

    The answer is in your title! Assuming the code is running from the form with the combo box in, try me.comboBoxName.Requery If that doesn't work, I would guess the record hasn't saved before this executes
  12. T

    Missing optional criteria causes error?

    If I enter an expression with optional criteria as the Default value for a control, so the first criterion is missing and the second isn’t, I get the following error: This doesn’t happen in code. e.g. using Allen Browne’s ELookup function (ELookup(Expr, Domain, [Criteria], [OrderClause]) I...
  13. T

    Hi!

    Hi everybody. I've developed solutions in Access on and off since 1996. Default forms definitely look better now than the horrid dark green of then. I'm entirely self-taught in Access, but have formal qualifications in computing and informatics. Because my use of Access is on and off I tend to...
Back
Top Bottom