Search results

  1. P

    Use form filter text in SQL

    Yes, thank you - I do know how to do all that, but that was not the problem. The problem was not creating a filter from scratch - the problem was dealing with the filter texts that Access creates when the user filters by a combobox. However, I have a working setup now. CJ_London wrote a...
  2. P

    Use form filter text in SQL

    That did it. I made a temp table of one field - the ID numbers of the main table. I use a SQL delete statement to clear it, then step through a RecordsetClone of the main form's recordset, writing each ID into this temp table, and finally join to this temp table to perform the manipulations...
  3. P

    Use form filter text in SQL

    No - that's the whole problem - a filter is NOT simply SQL. It contains specifically this Lookup_ syntax, which is some added functionality that Access forms have on top of SQL. If what it generated was pure SQL, I would be using that and this thread would not exist. All of what you write about...
  4. P

    Use form filter text in SQL

    If I had built this from scratch, maybe that would have been an option. But I came into this when the user already had an app, and knows something about how to use Access. That was years ago, and what the app is now is all my work, but she knows how to use things like right-click filters, and...
  5. P

    Use form filter text in SQL

    The recordsource that I want to update, and which crashes when using the filter text, is built entirely by me in VBA. There is no semicolon. I am not bringing in both fields. In fact, I am not brining in anything extra. The SQL that I am trying to execute is like this: "Update ZapisNalezu Set...
  6. P

    Use form filter text in SQL

    I do have tables with the same field name. KodStat is the code (ID) of the Stat table, and the same field name is used in the main stable, since that is the field I link on, and both fields thereby contain the same thing - the Stat ID codes. The Stat table is the rowsource for the combobx. But...
  7. P

    Use form filter text in SQL

    I could make a Join, I suppose, but that would be even more complicated. But there has to be some tie to the auxiliary tables that feed the comboboxes. Since the text being filtered on is the text in that aux table, and the main table only contains codes that point into the aux tables, it is...
  8. P

    Use form filter text in SQL

    The semi-colon? There are no semicolons in the form's filter clause.
  9. P

    Use form filter text in SQL

    But that is exactly what doesn't work. When the filter text contains this sort of stuff: [Lookup_cboOkres].[Okres] putting it into the Where clause of straight SQL throws an error, hence this post. If I could just use the filter text, I would be doing so.
  10. P

    Use form filter text in SQL

    I know how to use the Replace function, but how would you propose I use it here? I have to change the entire structure of the filter text, like I would have to change this: ([Lookup_cboZem].[Zem]="Beroun") to this: (Dlookup(0,"Zem","Zem = 'Beroun'") Is Not Null) And that is the simplest...
  11. P

    Use form filter text in SQL

    I have a database with a main from where the user filters the primary recordset using Access's built-in filtering tools, like the right-click menu offering equals, does not equal, contains, does not contain, starts with, etc. I subsequently need to do things to all records the use has filtered...
  12. P

    A problem occurred while Microsoft Access was communicating with the OLE server or ActiveX control

    Thank you, I did finally get that working. Never did solve the actual problem here, but a bit further down the road, I encountered another similar issue with this DB, and finally tracked it down to a 32-bit version of Stephen Lebans' PictureBox class. Lebans has quit Access, but some genius on...
  13. P

    Checkboxes passed ByVal instead of ByRef

    I've read about this bit with parentheses, but never had a problem with it, since I never call a Sub with parentheses. But I very much believe that it could lead to some serious hair-pulling. The referenced article, What do you mean "cannot use parentheses?" is great - clearest explanation of...
  14. P

    Checkboxes passed ByVal instead of ByRef

    Good characterization - I sometimes liken such software to a Labrador - sloppily overhelpful to the point of being obnoxious. I try very hard to avoid that in my own software - being so helpful that it actually causes the user more annoyance than assistance. I'm fortunate that I am in very...
  15. P

    Checkboxes passed ByVal instead of ByRef

    But that's what I mean by different possibilities. A variant CAN store a value, but it also CAN store a reference pointer. You say no check is done for a standard property, but such a check COULD be done - part of the underlying code with variants is determining what sort of object it contains...
  16. P

    Checkboxes passed ByVal instead of ByRef

    I played with trying to torture variants a while back, putting an array into a variant, but making it an array of variants, each of which could contain its own array, again of variants, and so on. I was looking for how deep I could go with such references, but instead of confusing the compiler...
  17. P

    Checkboxes passed ByVal instead of ByRef

    Now that's interesting. Variants are incredibly useful in some very specific situations, but they also have issues, like this. Do you know of anything that explains how variants behave in various situations, when there are several possibilities? I generally try to avoid them, and I may well wind...
  18. P

    Checkboxes passed ByVal instead of ByRef

    Hm, I'm going to have to experiment with that to get it clear in my head. My routines for fiddling controls generally set graphic properties, like when a set of conditions requires me to disable or enable some input fields, or displaying/hiding error messages. There of course I always refer to...
  19. P

    Checkboxes passed ByVal instead of ByRef

    Thanks, I already do that, always. Controls on my forms are always named cboSomething, txtSomething, chkSomething, tglSomething, cmdSomething, sfSomething, tabSomething and so on. I ran into just such confusion as you mention once, from an Access wizard that generated such names from source...
  20. P

    Checkboxes passed ByVal instead of ByRef

    Yes, yours works. Mine did not, but I was also trying to set the value of the control, and I remember now that I have run into this before. The code was ctl(i) = Falseand that doesn't work. It has to bearr(i).Value = False Apparently the default property of the checkbox somehow does not make it...
Back
Top Bottom