Search results

  1. P

    Extracting varying length string between two characters

    I don't know all the intricacies of JET, but I very much doubt if this statement is true. ALL other SQL languages have their own functions like Mid and Instr. Why would JET be any different? Yes, you can use custom VBA functions, but that does not at all mean that built-in functions go the same...
  2. P

    Extracting varying length string between two characters

    I just tested it on a table with only 20,000 records, and the difference in performance was VERY noticeable - the JET expression was essentially instant, while the VBA function took several seconds. Sure, you could do that, but why bother? All you're doing is forcing the engine to compute and...
  3. P

    Extracting varying length string between two characters

    Semantics are not the point. You can argue all sorts of things, including the greater capability of harnessing VBA, and it would be true. But using the expression I wrote allows the JET engine to generate the result directly, with no calls to external code. Try it yourself, on a large dataset...
  4. P

    Extracting varying length string between two characters

    RegEx and Split both require VBA coding. Using a straight expression does not. Mid([FieldName], InStr([FieldName], '-') + 1, InStr(InStr([FieldName], '-') + 1, [FieldName], '-') - InStr([FieldName], '-') - 1)
  5. P

    Custom event whine

    Oh, I wonder if that's it. I do have variables referring to the forms, and I don't think I clear those when I close the forms. I'll check that and let you know. Thanks for the tip.
  6. P

    Custom event whine

    That is a ridiculous statement. The seriousness of a problem and the difficulty of a workaround have nothing to do with each other.
  7. P

    Custom event whine

    Yes, really - that is what I am complaining about. It's not the amount of effort to necessary to get this working, it's the fact that ANY effort is necessary at all. Local variables are supposed to get destroyed when their containing form closes, period. Stuff is supposed to work the way the...
  8. P

    Extracting varying length string between two characters

    A bit late to the party, but I happened across this while looking for something. These forums are a great resource for archiving information, so even if DaniLucas no longer needs help, someone else may benefit. Here is a routine that illustrates the expression in VBA: Sub x() Const t1$ =...
  9. P

    Custom event whine

    I wish it were that simple. But I do that constantly. In fact, I have a specific routine for it. I close the db, then call a VBScript module that opens the db with the /Decompile switch, and holding Shift to prevent the app from starting up. I then do a C & R, compile, then C & R again, then...
  10. P

    Custom event whine

    I don't even know that I could confidently state that there is more to it. I have not been able to identify anything specific that I am doing to cause it, although it is not completely random - the forms that do it now do it reliably. But they did not do it when I first created all this. I was...
  11. P

    Custom event whine

    What do you imagine is 'outside the norm'? Custom events are a completely normal, documented feature of Access/VBA. It's not something I dreamed up and just happened to ran across an oddity that just happened to work. The entire user interface runs on events, and user-created events are a...
  12. P

    Custom event whine

    If I can figure out a reliable way to make this happen, I'll post it.
  13. P

    Custom event whine

    I don't know, I can try, but it seems like it might by a huge amount of work for little benefit. I have no way to reliably generate the problem - it started on its own and does not manifest in every form, even though they are almost identical, and Moke123 also wrote that his experience with it...
  14. P

    Custom event whine

    Bound or unbound is not the point - the point was a datasheet overview and a single record edit area in one form. It works as long as you don't try to do much trickery with code, but there are issues with code not being clear on which part of the form is being referenced. I don't remember the...
  15. P

    Custom event whine

    Glad to hear it's not just me. Yes, putting a Close event in each subform and manually setting the WithEvents variable to Nothing on form close fixes it. But it's a PIA, and should not be necessary. Is there some procedure for bitching to MS about this? I doubt if they will do anything, but at...
  16. P

    Custom event whine

    I don't see how. Each subform of the pop-up forms has one Set command on the subform's Load event, which sets the local WithEvents variable to point to that one global variable. The datasheet and edit subforms each have their own WithEvents variable, and both of them point to the global one...
  17. P

    Custom event whine

    I have recently changed an app to make heavy use of custom events. There is a class module containing all the events, and subroutines containing generally the single line of code to raise the event, since VBA does not allow events to be raised directly, but insists that they must be raised only...
  18. P

    Use form filter text in SQL

    Duplicating things that Access already knows how to do is usually a huge waste of time and effort. It is almost always slower, more trouble-prone and more likely to break when the boyz at MS change something. There are some special cases, of course, but again, I now have a solution to my...
  19. P

    Use form filter text in SQL

    I It is a single-file, single-user configuration. It needs to be portable, because the user takes it with her on field trips.
  20. P

    Use form filter text in SQL

    This is a dozen lines of code and runs in around 40 microseconds. What is not simple or efficient about it? And I can't take the values from the combobox because, once again, I am dealing with what the USER has filtered. The only place that information is available is in the form's filter...
Back
Top Bottom