Search results

  1. Papa_Bear1

    Odd problem running a query from VBA

    Interesting idea. I will say, however, that I experimented with the usual "On Error Resume Next" before and "On Error GoTo 0" after thing and then trapped this error and told it to go back and try again. It just errorred over and over -- which is also very strange given that it normally "works"...
  2. Papa_Bear1

    Odd problem running a query from VBA

    Corrupted query - that is interesting. I would think that compact/repair would resolve something like that - which I've tried - but maybe compact/repair would not solve that. I did try the currentdb.execute also, and it behaved the same way - seems no matter HOW I try to run that query - it is...
  3. Papa_Bear1

    Odd problem running a query from VBA

    In Access 365, I often dynamically construct queries in VBA, (e.g., in a variable like "strSQL"), and then run them with DoCmd.RunSQL strSQL. I've encountered a very odd situation where Access throws Error 3113 when encountering a certain query in a VBA routine, but then upon clicking the Debug...
  4. Papa_Bear1

    How to Create an Auto-Updated "LastEdited" Field

    That’s cool, because I was indeed wondering why the system was designed to require the lookup for after-update. (...according to he documentation I found at least...) Obviously, it knows what record it’s on or we couldn’t store the key. I first tried this simply by setting the date field, and...
  5. Papa_Bear1

    How to Create an Auto-Updated "LastEdited" Field

    With the introduction of Data Macros (apparently 2010 and later), Access now supports something close to a database trigger. I was very excited to finally be able to set up a Date/Time field that would automatically update to reflect the most recent edit of any field in a table. For this to...
  6. Papa_Bear1

    Problems with Replace function...

    So - I know it is not a syntax thing - because I can get the function to work in one Access file, but not another... As far as references - it is very interesting to try to 'pull the thread' on how 'internal' functions like this - used in SQL - somehow link to references...
  7. Papa_Bear1

    Problems with Replace function...

    Very nice to know - but I think that is applicable to use of the function in VBA - right? When I try that in the SQL design view - it just opens a "Zoom" pop-up. It turns out that I've discovered that the VBA Replace function still works - so I don't know what the Replace function in SQL is...
  8. Papa_Bear1

    Problems with Replace function...

    I should not have put the double-quotes there on the outside... they're not really there. I've noticed when running SQL directly - Access doesn't seem to care if you use single or double quotes to set off literals (e.g. around the 'ing'). When constructing SQL in VBA - I then resort to...
  9. Papa_Bear1

    Problems with Replace function...

    Interesting - I had never seen that before. I tried that and got "Undefined function 'VBA.Replace' in expression. Note that I'm referring to use of this function in SQL. If I can't get this to work - I'm contemplating walking every row of my data and trying a VBA replace instead. Very annoying...
  10. Papa_Bear1

    Problems with Replace function...

    I've managed to mess up my Access 365 installation to the point that if I try to use the Replace(x, y ,z) function in an SQL statement - it actually crashes Access. Does anyone know what dll is used by Access 365 to perform this function in SQL statements?
  11. Papa_Bear1

    Data Macro triggers/fires only under certain circumstances

    Point well taken! :)
  12. Papa_Bear1

    Data Macro triggers/fires only under certain circumstances

    Hmmmm - I guess I'm not communicating well - sorry 'bout that... I have input data files that get imported and processed in the back-end - and it made sense to me for all of that import and processing code to exist within the back-end database. Since all of the back-end tables could be linked...
  13. Papa_Bear1

    Data Macro triggers/fires only under certain circumstances

    When a particular user type (Admin type) is using the front-end, and they click the 'Update' button - this means they want the back-end to process new input files. So, in the front-end, I use code that lets you execute code in a separate access file - as such: dim appAccess As New...
  14. Papa_Bear1

    Data Macro triggers/fires only under certain circumstances

    Interesting... After looking into that - it seems those errors were there only due to issues while I was setting it up. It now seems to work without generating any new errors... I ended up adding a command in the back-end code that runs a query in the front-end that modifies that table - thus...
  15. Papa_Bear1

    Data Macro triggers/fires only under certain circumstances

    Yes - a timer is another way to go - but I was trying to avoid that and have it actually event-triggered.
  16. Papa_Bear1

    Data Macro triggers/fires only under certain circumstances

    I'll have to chew on that. I guess it is indeed another anomaly of this approach - as it will always be in a state of "having-been-connected" to someone's front-end. But since I'm expecting that to be quite static (essentially one person under normal circumstances) it seemed at least OK to do...
  17. Papa_Bear1

    Data Macro triggers/fires only under certain circumstances

    Actually - there is only one Data Macro and it resides in the front-end. I figured it best to get it working in the isolated front-end area first - which it does. Then in the BE, I linked to the FE message table. The hope is to have BE code be able to make changes to that FE message table and...
  18. Papa_Bear1

    Data Macro triggers/fires only under certain circumstances

    In the attached, there are a couple database files, one is for FE and one for BE. Note that they only contain what is necessary for this question - so they don't even have any of the usual data tables that would be in the back-end. So I know it looks reversed, but that just happens to be what...
  19. Papa_Bear1

    Data Macro triggers/fires only under certain circumstances

    @jdraw - I will see if I can quickly gin up a couple files - but was hoping that the explanation of the code might be sufficient. @theDBguy - All of what I described is in the front-end and it works when changes are made within the front-end. What I have is a back-end database that links to...
  20. Papa_Bear1

    Data Macro triggers/fires only under certain circumstances

    In my table (called tabFEMessages) I have set up a RunDataMacro on the After Update, that calls a Data Macro named "tabFEMessages.dmUpdateStatusMessage. The Data Macro has only one command in it: SetLocalVar Name varStatus Expression = UpdateStatus([StatusMessage]) Where "UpdateStatus" is my...
Back
Top Bottom