Search results

  1. Papa_Bear1

    Odd problem running a query from VBA

    Right --- Well - those are not the real fieldnames - sorry 'bout that - as I said - I had to sort of mash up a sample... I think it may be too difficult to troubleshoot here without the real query. I was hoping - though - that the issue was NOT the query - since it CAN run - just by...
  2. Papa_Bear1

    Odd problem running a query from VBA

    Not to light another fuse, but I think we all know Access <> Oracle. But that is kind of the point too. I've built a lot of nice, efficient, handy tools with Access. Is it perfect? No. Does it meet every requirement? No. Is it bulletproof? Not by a longshot. But you can get a LOT done with it...
  3. Papa_Bear1

    Odd problem running a query from VBA

    Funny - I had not heard the "with a rubber mallet" add-on before... ;-) I'll try to hand-jam in something that represents the actual query --- can't really put the entire real thing in here... UPDATE tabMain AS M, tabTemp AS T SET M.Position = T.[Position], M.MoveDate = T.[Move Date]...
  4. Papa_Bear1

    Odd problem running a query from VBA

    True... The exact message was: Run-time error '3113': Cannot update '(expression)'; field not updateable. I guess that isn't all the much more informative - other than it is referring to an '(expression)' rather than a particular field name. I'm trying to put together something I can post to...
  5. Papa_Bear1

    Odd problem running a query from VBA

    True - I'll try a delay to see if that helps any...
  6. Papa_Bear1

    Odd problem running a query from VBA

    Good idea. I did try a "DoEvents" to see if maybe there were some lingering things undone, but it didn't help. Perhaps there is some other command I should run to make sure nothing is lingering?
  7. Papa_Bear1

    Odd problem running a query from VBA

    Also a very good point. Here's yet another strange set of characteristics surrounding this - related to that idea of it actually still being something wrong with the query. As you point out - I originally assumed it was a problem with the query - as we all would of course! I then modified my...
  8. 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"...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. 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?
  18. Papa_Bear1

    Data Macro triggers/fires only under certain circumstances

    Point well taken! :)
  19. 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...
  20. 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...
Back
Top Bottom